Skip to content

PdfGraphics.DrawLine Method

Overloads

Name Description
DrawLine(PdfPen,Double,Double,Double,Double) Draws a line connecting the two points specified by the coordinate pairs.
DrawLine(PdfPen,PdfPoint,PdfPoint) Draws a line connecting two PdfPoint objects.

DrawLine(PdfPen,Double,Double,Double,Double)

Draws a line connecting the two points specified by the coordinate pairs.

C#
public void DrawLine(PdfPen pen, double x1, double y1, double x2, double y2)

Parameters

pen PdfPen

PdfPen Pen that determines the color, width, and style of the line.

x1 Double

The x-coordinate of the first point.

y1 Double

The y-coordinate of the first point.

x2 Double

The x-coordinate of the second point.

y2 Double

The y-coordinate of the second point.

DrawLine(PdfPen,PdfPoint,PdfPoint)

Draws a line connecting two PdfPoint objects.

C#
public void DrawLine(PdfPen pen, PdfPoint pt1, PdfPoint pt2)

Parameters

pen PdfPen

PdfPen Pen that determines the color, width, and style of the line.

pt1 PdfPoint

PdfPoint object that represents the first point to connect.

pt2 PdfPoint

PdfPoint object that represents the second point to connect.