GraphicsPath::AddLine Method (Single, Single, Single, Single)

 

Appends a line segment to this GraphicsPath.

Namespace:   System.Drawing.Drawing2D
Assembly:  System.Drawing (in System.Drawing.dll)

public:
void AddLine(
	float x1,
	float y1,
	float x2,
	float y2
)

Parameters

x1
Type: System::Single

The x-coordinate of the starting point of the line.

y1
Type: System::Single

The y-coordinate of the starting point of the line.

x2
Type: System::Single

The x-coordinate of the endpoint of the line.

y2
Type: System::Single

The y-coordinate of the endpoint of the line.

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

.NET Framework
Available since 1.1
Return to top
Show: