绘制椭圆
Posted feiyucha
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了绘制椭圆相关的知识,希望对你有一定的参考价值。
实现效果:
知识运用:
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); }
以上是关于绘制椭圆的主要内容,如果未能解决你的问题,请参考以下文章