一段画线程序(部分)
g.SmoothingMode = SmoothingMode.AntiAlias;
Pen pen;
if (DrawPen == null)
pen = new Pen(Color, PenWidth);
else
pen = DrawPen.Clone() as Pen;
// Convert the array of points to a GraphicsPath object so lines are mitered correctly at the intersections
// (not to mention the object is drawn faster then drawing individual lines)
Point[] pts = new Point[pointArray.Count];
for (int i = 0; i < pointArray.Count; i++)
{
Point px = (Point)pointArray[i];
pts[i] = px;
}
byte[] types = new byte[pointArray.Count];
for (int i = 0; i < pointArray.Count; i++)
types[i] = (byte)PathPointType.Line;
GraphicsPath gp = new GraphicsPath(pts, types);
// Rotate the path about it's center if necessary
if (Rotation !=