积极答复者
怎样画出多边形

问题
答案
-
你好!
可以参考这个实例:
public void DrawPolygonPoint(PaintEventArgs e) { // Create pen. Pen blackPen = new Pen(Color.Black, 3); // Create points that define polygon. Point point1 = new Point(50, 50); Point point2 = new Point(100, 25); Point point3 = new Point(200, 5); Point point4 = new Point(250, 50); Point point5 = new Point(300, 100); Point point6 = new Point(350, 200); Point point7 = new Point(250, 250); Point[] curvePoints = { point1, point2, point3, point4, point5, point6, point7 }; // Draw polygon to screen. e.Graphics.DrawPolygon(blackPen, curvePoints); }
周雪峰- 已标记为答案 KeFang Chen 2010年5月26日 5:42
全部回复
-
你好!
可以参考这个实例:
public void DrawPolygonPoint(PaintEventArgs e) { // Create pen. Pen blackPen = new Pen(Color.Black, 3); // Create points that define polygon. Point point1 = new Point(50, 50); Point point2 = new Point(100, 25); Point point3 = new Point(200, 5); Point point4 = new Point(250, 50); Point point5 = new Point(300, 100); Point point6 = new Point(350, 200); Point point7 = new Point(250, 250); Point[] curvePoints = { point1, point2, point3, point4, point5, point6, point7 }; // Draw polygon to screen. e.Graphics.DrawPolygon(blackPen, curvePoints); }
周雪峰- 已标记为答案 KeFang Chen 2010年5月26日 5:42