MFC 不规则图形颜色填充的问题
MFC基于对话框,在用picturecontrol控件中用lineto和moveto画不规则图形,颜色填充不知为何填不上,还请大神指导~CBrushb(RGB(255,2...
MFC基于对话框,在用picture control控件中用lineto和moveto画不规则图形,颜色填充不知为何填不上,还请大神指导~
CBrush b(RGB(255,255,255));
CBrush *pOldBrush = dc->SelectObject(&b);
dc->MoveTo(int(cy[flag[i]]), int(cx[flag[i]]));//画第一个点
for (j = flag[i] + 1; j<flag[i + 1]; j++)
{
dc->LineTo(int(cy[j]), int(cx[j])); //画其余点
}
dc->SelectObject(pOldBrush); 展开
CBrush b(RGB(255,255,255));
CBrush *pOldBrush = dc->SelectObject(&b);
dc->MoveTo(int(cy[flag[i]]), int(cx[flag[i]]));//画第一个点
for (j = flag[i] + 1; j<flag[i + 1]; j++)
{
dc->LineTo(int(cy[j]), int(cx[j])); //画其余点
}
dc->SelectObject(pOldBrush); 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询