多边形 - 颜色变化 [英] Polygon - color changing

查看:82
本文介绍了多边形 - 颜色变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在mfc中用于绘图我有多边形我必须用一种颜色填充多边形,并且只用黑色或白色填充边框。如何在mfc cdc类中实现多边形。你可以建议我吗。



我尝试过:



in mfc for drawing i have polygon i have to fill the polygon with one color and only border with black or white . how to do that for polygon in mfc cdc class. could you please suggest me.

What I have tried:

CPen cPen(PS_SOLID, 0, RGB(255, 255, 255));
		pDC->SelectObject(&cPen);

推荐答案

创建笔和画笔并将其选中绘制多边形之前的CDC。



参见 CDC ::多边形 [ ^ ]例如代码。
Create a pen and a brush and select them into the CDC before drawing the polygon.

See CDC::Polygon[^] for example code.


这篇关于多边形 - 颜色变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆