System.Drawing.Drawing2D.GraphicsPath.AddLine Method

Appends a line segment to the current figure.

Syntax

public void AddLine (int x1, int y1, int x2, int y2)

Parameters

x1
The x-coordinate of the starting point of the line.
y1
The y-coordinate of the starting point of the line.
x2
The x-coordinate of the endpoint of the line.
y2
The y-coordinate of the endpoint of the line.

Remarks

This method adds the line segment defined by the specified points to the end of the current figure. If there are previous lines or curves in the System.Drawing.Drawing2D.GraphicsPath, a line segment is drawn to connect the last point in the path to the first point in the new line segment.

Requirements

Namespace: System.Drawing.Drawing2D
Assembly: System.Drawing (in System.Drawing.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0