首页 > 代码库 > C# 画个实心圆

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));//画实心椭圆

C# 画个实心圆