摘要:
前面利用DrawArc能绘制出椭圆来。GDI+还有专门绘制椭圆的函数DrawEllipseDrawEllipse(Pen,Rectangle)DrawEllipse(Pen,RectangleF)DrawEllipse(Pen,Int32,Int32,Int32,Int32)DrawEllipse(Pen,Single,Single,Single,Single)private void Form1_Paint(object sender, PaintEventArgs e){ //创建画板从Paint事件中的直接引用Graphics对象 Graphics graphics ... 阅读全文
摘要:
DrawBezier(Pen,Point,Point,Point,Point)DrawBezier(Pen,PointF,PointF,PointF,PointF)DrawBezier(Pen,Single,Single,Single,Single,Single,Single,Single,Single)DrawCurve(Pen,Point[])DrawCurve(Pen,PointF[])DrawCurve(Pen,Point[],Single)DrawCurve(Pen,PointF[],Int32,Int32)DrawCurve(Pen,Point[],Int32,Int32,Sing 阅读全文
摘要:
//使用下面的函数DrawArc(Pen,Rectangle,Single,Single)DrawArc(Pen,RectangleF,Single,Single)DrawArc(Pen,Int32,Int32,Int32,Int32,Int32,Int32)DrawArc(Pen,Single,Single,Single,Single,Single,Single)private void Form1_Paint(object sender, PaintEventArgs e){ //创建画板从Paint事件中的直接引用Graphics对象 Graphics graphic... 阅读全文
摘要:
DrawLines(Pen pen,PointF[] points)绘制多个直线private void Form1_Paint(object sender, PaintEventArgs e){ //创建画板从Paint事件中的直接引用Graphics对象 Graphics graphics = e.Graphics; //定义画笔 Pen pen = new Pen(Color.Red, 3.0f); //定义坐标数组 PointF[] points = { new PointF(10.0f,10.0f),... 阅读全文
摘要:
.Net中在System.Drawing命名空间下使用Graphics类画线。有四种方法画线。//绘制一条连接两个Point结构的线DrawLine(Pen,Point,Point)//绘制一条连接两个PointF结构的线DrawLine(Pen,PointF,PointF)//绘制一条连接由坐标对指定的两个点的线条DrawLine(Pen,Int32,Int32,Int32,Int32)//绘制一条连接由坐标对指定的两个点的线条DrawLine(Pen,Single,Single,Single,Single)private void Form1_Paint(object sender, Pa 阅读全文