xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

  • 大小: 84KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-10
  • 語(yǔ)言: 其他
  • 標(biāo)簽: 圖層操作??二維變換??

資源簡(jiǎn)介

直線、圓、多邊形 這是針對(duì)09年所寫計(jì)算機(jī)圖形學(xué)源碼重構(gòu)后的版本。新版本在實(shí)現(xiàn)用多種算法生成直線、圓、多邊形等圖形圖像的同時(shí),使用了雙緩存繪圖防止圖像閃爍,并使用自定義結(jié)構(gòu)掃描線存儲(chǔ)所繪連塊圖形區(qū)域提高了二次繪圖效率。 同時(shí)將所有圖形圖像封裝成類,便于圖形的重繪以及旋轉(zhuǎn)、平移、縮放、對(duì)稱變換等幾何操作。 這是真正意義上實(shí)現(xiàn)了二維圖層操作,而不是一個(gè)演示性的算法。 光照實(shí)驗(yàn)與消隱借用已有代碼,因此代碼變量命名風(fēng)格與之前的不統(tǒng)一。

資源截圖

代碼片段和文件信息

#include?“StdAfx.h“
#include?“shape.h“
#include?“Math.h“
#ifndef?AFX_CIRCLE_kHaXxGHcA3eTghZD5EHQF3FyVkZVwmcZNDbv5EUvsCMwMDOPZGcHlnR_LP10VelGTFBsb3ZlTEc_0722_03_21_141320211_
#define?AFX_CIRCLE_kHaXxGHcA3eTghZD5EHQF3FyVkZVwmcZNDbv5EUvsCMwMDOPZGcHlnR_LP10VelGTFBsb3ZlTEc_0722_03_21_141320211_

IMPLEMENT_SERIAL(CCircleCShape1)
//構(gòu)造函數(shù)初始化各類參數(shù)
CCircle::CCircle(CPoint?pCenter?CPoint?pEdge?int?Width?int?styleBOOL?bFill?COLORREF?pColorCOLORREF?fillColor)
{
m_pCenter=pCenter;m_pEdge=pEdge;m_pWidth=Width;m_nstyle=style;m_pColor=pColor;m_FillColor=fillColor;
m_bIsSelected?=?FALSE;
m_bIsAutoFilled?=?bFill;
}

//序列化
void?CCircle::Serialize(CArchive&?ar)
{
if(ar.IsStoring())
ar<yle;
else
ar>>m_pCenter.x>>m_pCenter.y>>m_pEdge.x>>m_pEdge.y>>m_nstyle;
CShape::Serialize(ar);
}

void?CCircle::Drawing(CDC?*pDC)
{
COLORREF?colorPenSave?=?m_pColor;
COLORREF?colorFillSave?=?m_FillColor;
if?(m_bIsSelected)
{
m_pColor?=?RGB(200200200); //顯示選中
m_FillColor?=?RGB(200200200); //顯示選中
}

if(m_bIsAutoFilled)
FillCirCle(pDC);

switch?(m_nstyle)
{
case?MID_CIRCLE:MIDCircle(pDC);break;
case?PLUSMINUS_CIRCLE:PlusMinusCircle(pDC);break;
case?BRESENHAM_CIRCLE:BresenHamCircle(pDC);break;
default:break;
}

m_pColor?=?colorPenSave;
m_FillColor?=?colorFillSave;

}

void?CCircle::SavePoint()
{
m_pCenterSave?=m_pCenter;
m_pEdgeSave?=?m_pEdge;
}

CRect?CCircle::GetBoundaryRect()
{
CRect?rect;
int?r=(int)sqrt((m_pCenter.x-m_pEdge.x)*(m_pCenter.x-m_pEdge.x)
+(m_pCenter.y-m_pEdge.y)*(m_pCenter.y-m_pEdge.y));
rect.left?=?m_pCenter.x?-?r;
rect.right=?m_pCenter.x?+?r;
rect.top=?m_pCenter.y?-?r;
rect.bottom=?m_pCenter.y?+?r;
return?rect;
}

void?CCircle::MIDCircle(CDC?*pDC)
{
int?rxdydeltaxdeltayx0y0iiiii;
CPen?PenNew(PS_SOLID1m_pColor)?*?pOldPen;//設(shè)置畫筆
CBrush?Brh(m_pColor)?*pOldBrh; //設(shè)置筆刷
pDC->SetROP2(R2_COPYPEN);??? //繪圖方法為直接畫
pOldPen?=?pDC->Selectobject(&PenNew);
pOldBrh?=?pDC->Selectobject(&Brh);
????r=(int)sqrt((m_pCenter.x-m_pEdge.x)*(m_pCenter.x-m_pEdge.x)
+(m_pCenter.y-m_pEdge.y)*(m_pCenter.y-m_pEdge.y));
x=0;y=r;
deltax=3;deltay=2-r-r;d=1-r;x0=m_pCenter.x;y0=m_pCenter.y;
ii=m_pWidth/2;iii=(m_pWidth+1)/2;
while(x<=y)
{
if(m_pWidth==1)????//線寬為1時(shí)候用點(diǎn)劃
{
pDC->SetPixel(x+x0y+y0m_pColor);
pDC->SetPixel(-x+x0y+y0m_pColor);
pDC->SetPixel(x+x0-y+y0m_pColor);
pDC->SetPixel(-x+x0-y+y0m_pColor);
pDC->SetPixel(y+x0x+y0m_pColor);
pDC->SetPixel(-y+x0x+y0m_pColor);
pDC->SetPixel(y+x0-x+y0m_pColor);
pDC->SetPixel(-y+x0-x+y0m_pColor);
}
else
if(m_pWidth!=1) //線寬不為1時(shí)候用圓畫
{
pDC->Ellipse(x+x0-iiy+y0-iix+x0+iiiy+y0+iii);
pDC->Ellipse(-x+x0-iiy+y0-ii-x+x0+iiiy+y0+iii);
pDC->Ellipse(x+x0-ii-y+y0-iix+x0+iii-y+y0+iii);
pDC->Ellipse(-x+x0-ii-y+y0-ii-x+x0+iii-y+y0+iii);
pDC->Ellipse(y+x0-ii

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????7298??2011-07-20?14:01??ComputerGraphic\Circle.cpp

?????文件???????6825??2011-07-20?14:01??ComputerGraphic\CircleSetDlg.cpp

?????文件???????1853??2011-07-20?14:01??ComputerGraphic\CircleSetDlg.h

?????文件???????4371??2011-07-20?14:01??ComputerGraphic\ComputerGraphic.cpp

?????文件???????6521??2011-07-20?14:01??ComputerGraphic\ComputerGraphic.dsp

?????文件????????555??2011-07-20?14:01??ComputerGraphic\ComputerGraphic.dsw

?????文件???????1449??2011-07-20?14:01??ComputerGraphic\ComputerGraphic.h

?????文件?????123904??2011-07-20?14:47??ComputerGraphic\ComputerGraphic.ncb

?????文件??????53760??2011-07-20?14:47??ComputerGraphic\ComputerGraphic.opt

?????文件???????3246??2011-07-20?14:14??ComputerGraphic\ComputerGraphic.plg

?????文件??????22039??2011-07-20?14:01??ComputerGraphic\ComputerGraphic.rc

?????文件???????2296??2011-07-20?14:01??ComputerGraphic\ComputerGraphicDoc.cpp

?????文件???????1623??2011-07-20?14:01??ComputerGraphic\ComputerGraphicDoc.h

?????文件??????56135??2011-07-20?14:01??ComputerGraphic\ComputerGraphicView.cpp

?????文件???????6032??2011-07-20?14:01??ComputerGraphic\ComputerGraphicView.h

?????文件???????7602??2011-07-20?14:01??ComputerGraphic\DrawDlg.cpp

?????文件???????1756??2011-07-20?14:01??ComputerGraphic\DrawDlg.h

?????文件???????1878??2011-07-20?14:01??ComputerGraphic\EditEx.cpp

?????文件???????1304??2011-07-20?14:01??ComputerGraphic\EditEx.h

?????文件??????10806??2011-07-20?14:01??ComputerGraphic\line.cpp

?????文件???????4229??2011-07-20?14:01??ComputerGraphic\LineSetDlg.cpp

?????文件???????1673??2011-07-20?14:01??ComputerGraphic\LineSetDlg.h

?????文件???????3203??2011-07-20?14:01??ComputerGraphic\MainFrm.cpp

?????文件???????1551??2011-07-20?14:01??ComputerGraphic\MainFrm.h

?????文件???????1232??2011-07-20?14:01??ComputerGraphic\Matirx.h

?????文件???????2579??2011-07-20?14:01??ComputerGraphic\MyFace.h

?????文件???????5028??2011-07-20?14:01??ComputerGraphic\Polygon.cpp

?????文件???????4535??2011-07-20?14:01??ComputerGraphic\ReadMe.txt

?????文件????????766??2011-07-09?17:34??ComputerGraphic\res\3dsmove.cur

?????文件???????3262??2011-07-10?04:32??ComputerGraphic\res\4.cur

............此處省略26個(gè)文件信息

評(píng)論

共有 條評(píng)論

相關(guān)資源