首页 > 其他 > 详细

绘制椭圆

时间:2019-01-11 21:12:39      阅读:198      评论:0      收藏:0      [点我收藏+]

实现效果:

  技术分享图片

知识运用:

  Graphics类中的DrawEllipse方法

  public void  DrawEllipse (Pen pen,Rectangle rect)  //绘制边界由Rectangle结构指定的椭圆

  public void DrewEllipse (Pen pen ,int x ,int x, int width,int height)  //由边框指定的椭圆

实现代码:

        private void button1_Click(object sender, EventArgs e)
        {
            Pen greenPen = new Pen(Color.Green,5);
            Graphics g = this.CreateGraphics();
            g.DrawEllipse(greenPen,35,20,200,140);
        }

 

绘制椭圆

原文:https://www.cnblogs.com/feiyucha/p/10257162.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!