1.关于ALTERNATE与WINDING的源码eclipse rcp源码 下载解释
2.vcç»å¾å
关于ALTERNATE与WINDING的解释
void xxxView::OnDraw(CDC* pDC)
{
POINT points1[] =
{
{ , },
{ , },
{ , },
{ , },
{ , },
{ , },
{ , },
{ , }
};
POINT points2[] =
{
{ , },
{ , },
{ , },
{ , },
{ , },
{ , },
{ , },
{ , }
};
CPen bluePen(PS_SOLID, 1, RGB(0, 0, ));
CBrush yellowBrush(RGB(, , 0));
CBrush* pOldbrush = pDC->SelectObject(&yellowBrush);
CPen* pOldpen = pDC->SelectObject(&bluePen);
pDC->SetTextColor(RGB(, 0, 0));
pDC->SetBkMode(TRANSPARENT);
pDC->Polygon(points1, _countof(points1));
pDC->TextOut(, , _T("points1 polygon shape"));
for (int i = 0; i < _countof(points1); i++)
{
CString str;
str.Format(_T("%d"), i + 1);
pDC->TextOut(points1[i].x - 8, points1[i].y - 4, str);
}
pDC->SetViewportOrg(, 0);
pDC->TextOut(, , _T("points2 polygon shape"));
pDC->Polygon(points2, _countof(points2));
for (int i = 0; i < _countof(points2); i++)
{
CString str;
str.Format(_T("%d"), i + 1);
pDC->TextOut(points2[i].x - 8, points2[i].y - 4, str);
}
pDC->SelectObject(pOldbrush);
pDC->SelectObject(pOldpen);
}
vcç»å¾å
åªè½æä¾ä¸é¨å代ç ï¼é¦å ï¼å建ä¸ä¸ªMFCâåææ¡£âçé¢ãå ¶ä»è®¾ç½®é»è®¤å³å¯ãååå设æ¯MyDrawã
æ¾å°CMyDrawViewéé¢çOnDrawå½æ°ãå¦æåæ°pDC被注éæï¼åå»æ注éã
å½æ°åå为ï¼CMyDrawView::OnDraw( CDC * pDC )
å¨â// TODO: å¨æ¤å¤ä¸ºæ¬æºæ°æ®æ·»å ç»å¶ä»£ç âä¹åæ·»å ä¸å代ç
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
pDC->MoveTo( , );
pDC->LineTo( , );
pDC->LineTo( , );
ä¸è¿°ä»£ç å·²ç»å¨VSä¸éè¿ããç»çæ¯ä¸ä¸ªæ¡åã