C# 画个实心圆
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));//畫實心橢圓
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));//畫實心橢圓
轉載于:https://www.cnblogs.com/zhangdong-ah/p/4193249.html
總結
- 上一篇: java检测kafka是否连接成功,Ka
- 下一篇: C#学习资料