绘制直线、矩形、曲线和多边形
绘制直线
public void DrawLine(Pen pen,Point,Point);
public void DrawLine(Pen pen,PointF,PointF);
public void DrawLine(Pen pen,int,int,int,int);
public void DrawLine(Pen pen, float,float,float,float);
public void DrawLines(Pen pen,PointF[] points);
绘制矩形
public void DrawRectangle(Pen pen,Rectangle rect);
public void DrawRectangle(Pen pen,int x, int y, int width,int height);
public void DrawRectangle(Pen pen,float x, float y, float width, float height);
public void DrawRectangle(Pen pen, Rectangle[] rects);
public void DrawRectangle(Pen pen,RectangleF[] rects);
x 要绘制的矩形的左上角的X坐标
y 要绘制的矩形的左上角的Y坐标
width 要绘制的矩形的宽度
height 要绘制的矩形的高度
绘制简单曲线
public void DrawCurve(Pen,Point[]);
public void DrawCurve(Pen,PointF[]);
public void DrawCurve(Pen,Point[],float);
使用指定的张力绘制
public void DrawCurve(Pen,PointF[],float);
public void DrawCurve(Pen,Point[],int,int,float);
从相对与数组开始位置的偏移量开始绘制
public void DrawCurve(Pen,PointF[],int,int,float);
绘制闭合曲线
public void DrawClosedCurve(Pen,Point[]);
public void DrawClosedCurve(Pen,PointF[]);
public void DrawClosedCurve(Pen,Point[],float,fillmode);
使用指定的张力绘制Point结构数组定义的闭合基数样条
public void DrawClosedCurve(Pen,Point[],float,fillmode);
绘制贝塞尔曲线
public void DrawBeziers(Pen pen,Point pt1,Point pt2,Point pt3,Point pt4);
public void DrawBeziers(Pen pen,PointF pt1,PointF pt2,PointF pt3,PointF pt4);
public void DrawBeziers(Pen pen,float x1,float y1,float x2,float y2,float x3, float y3,float x4,float y4);
public void DrawBeziers(Pen pen,Point[] points);
public void DrawBeziers(Pen pen,PointF[] points);
pt1:表示曲线的起始点
pt2:表示曲线的第一个控制点
pt3 表示曲线第二个控制点
pt4 表示曲线的结束点
绘制多边形
public void DrawPolygon(Pen pen,Point[] points);
public void DrawPolygon(Pen pen,PointF[] points);
绘制弧线
public void DrawArc(Pen pen,Rectangle rect, float startAngle, float sweepAngle);
public void DrawArc(Pen pen,RectangleF rect, float startAngle, float sweepAngle);
public void DrawArc(Pen pen,int x,int y,int width,int height,int startAngle,int sweepAngle);
public void DrawArc(Pen pen,float x,float y,float width,float height,float startAngle,float sweepAngle);
rect 定义椭圆的边界
startAngle 从X轴到弧线的起始点沿顺时针方向度量的角
sweepAngle 从startAngle 参数到弧线的结束点沿顺时针方向度量的角
绘制扇形
public void DrawPie(Pen pen,Rectangle rect, float startAngle, float sweepAngle);
public void DrawPie(Pen pen,RectangleF rect, float startAngle, float sweepAngle);
public void DrawPie(Pen pen,int x,int y,int width,int height,int startAngle,int sweepAngle);
public void DrawPie(Pen pen,float x,float y,float width,float height,float startAngle,float sweepAngle);
startAngle 从X轴到扇形的第一条边沿顺时针方向度量的角
sweepAngle 从startAngle 参数到扇形第二条边沿顺时针方向的度量角