Graphics.DrawLines Method

Draws a series of line segments that connect number of points defined by an array of PointF structures.

Namespace: Aurigma.GraphicsMill.AdvancedDrawing
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

C#
public void DrawLines(
	Pen pen,
	PointF[] points
)

Parameters

pen

Type: Aurigma.GraphicsMill.AdvancedDrawing.Pen

A Pen that determines the color, width, and style of the line segments.
points

Type: System.Drawing.PointF[]

An array of PointF structures that represent the points to connect.

Remarks

Polyline is a set of connected lines (end point of some polyline segment is a start point of the next segment). It is defined with an array of points which should be connected with this polyline (polyline vertices).

Examples

C#
using (var bitmap = new Bitmap(170, 160, PixelFormat.Format24bppRgb, RgbColor.White))
using (var graphics = bitmap.GetAdvancedGraphics())
{
    System.Drawing.PointF[] points = {
        new System.Drawing.PointF(5,  65),
        new System.Drawing.PointF(85, 5),
        new System.Drawing.PointF(165, 65),
        new System.Drawing.PointF(135, 153),
        new System.Drawing.PointF(35,  153),
        new System.Drawing.PointF(5, 65)};
    graphics.DrawLines(new Pen(RgbColor.Green), points);
    bitmap.Save(@"Images\Output\out.png");
}

See Also

Reference

Manual