C# 画个实心圆

时间:2014-12-30 13:09:49   收藏:0   阅读:2610
Graphics dc = listView1.CreateGraphics();
Pen redpen = new Pen(Color.Red, 2);
dc.DrawEllipse(redpen, 0, 100, 50, 50);
像这个画的是个空心的圆,我想画个实心的该怎么弄啊??


回答:
用Brush填充,不用Pen

System.Drawing.SolidBrush myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Red);//画刷
formGraphics.FillEllipse(myBrush, new Rectangle(0, 0, 100, 200));//画实心椭圆
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!