g.DrawArc(new Pen(Color.Red, 50), new RectangleF(200, 200, 50, 50), 0, 180);
为什么我画出来的不像个半圆。。

解决方案 »

  1.   

     SolidBrush redBrush = new SolidBrush(Color.Red);            // Create graphics path object and add ellipse.
                GraphicsPath graphPath = new GraphicsPath();
               // graphPath.AddEllipse(0, 0, 100, 100);
                graphPath.AddArc(new Rectangle(0,0,100,100),0.0f,180.0f);
                // Fill graphics path to screen.
                e.Graphics.FillPath(redBrush, graphPath);
      

  2.   

    先谢谢你啊
    我希望拿Pen画半圆,因为我要画的是圆弧
    比较宽的圆弧就成了个半圆,用画圆弧的方法怎么画出个半圆啊
      

  3.   


       e.Graphics.DrawArc(new Pen(Color.Red,50), new RectangleF(200, 200, 50, 50), 0, 190);相对看起来比较像吧
    你自己想像一下你拿那么大的画笔来画,怎么画出个半圆不就知道了吗?