绘制扇形

实现效果:

  

知识运用:

  Graphics类中的DrawPie方法

  public void DrawPie (Pen pen,Rectangle rectangle, startAngle, float sweepAngle)

  public void DrawPie (Pen pen, int  x,int y int width ,int height, int startAngle ,int sweepAngle)

实现代码:

        private void button1_Click(object sender, EventArgs e)
        {
            Graphics g = this.CreateGraphics();
            Pen myPen = new Pen(Color.Black,2);
            g.DrawPie(myPen,30,20,200,140,0,240);
        }

猜你喜欢

转载自www.cnblogs.com/feiyucha/p/10257608.html
今日推荐