DrawLine()

Graphics::DrawLine(const SharedPtr<Pen>&, Point, Point) method

Draws the specified line using the specified pen.

void System::Drawing::Graphics::DrawLine(const SharedPtr<Pen> &pen, Point pt1, Point pt2)

Arguments

ParameterTypeDescription
penconst SharedPtr<Pen>&A Pen object that specifies graphical properties of the line to draw
pt1PointThe first point defining the line to draw
pt2PointThe second point defining the line to draw

Graphics::DrawLine(const SharedPtr<Pen>&, PointF, PointF) method

Draws the specified line using the specified pen.

void System::Drawing::Graphics::DrawLine(const SharedPtr<Pen> &pen, PointF pt1, PointF pt2)

Arguments

ParameterTypeDescription
penconst SharedPtr<Pen>&A Pen object that specifies graphical properties of the line to draw
pt1PointFThe first point defining the line to draw
pt2PointFThe second point defining the line to draw

Graphics::DrawLine(const SharedPtr<Pen>&, int, int, int, int) method

Draws the specified line using the specified pen.

void System::Drawing::Graphics::DrawLine(const SharedPtr<Pen> &pen, int x1, int y1, int x2, int y2)

Arguments

ParameterTypeDescription
penconst SharedPtr<Pen>&A Pen object that specifies graphical properties of the line to draw
x1intThe X-coordinate of the first point defining the line to draw
y1intThe Y-coordinate of the first point defining the line to draw
x2intThe X-coordinate of the second point defining the line to draw
y2intThe Y-coordinate of the second point defining the line to draw

Graphics::DrawLine(const SharedPtr<Pen>&, float, float, float, float) method

Draws the specified line using the specified pen.

void System::Drawing::Graphics::DrawLine(const SharedPtr<Pen> &pen, float x1, float y1, float x2, float y2)

Arguments

ParameterTypeDescription
penconst SharedPtr<Pen>&A Pen object that specifies graphical properties of the line to draw
x1floatThe X-coordinate of the first point defining the line to draw
y1floatThe Y-coordinate of the first point defining the line to draw
x2floatThe X-coordinate of the second point defining the line to draw
y2floatThe Y-coordinate of the second point defining the line to draw

See Also