Method DrawLine

Namespace
SoftZenPdf
Assembly
SoftZenPdf.dll

DrawLine(double, double, double, double, PdfColor?, double)

Draws a straight line.

public ContentStreamWriter DrawLine(double x1, double y1, double x2, double y2, PdfColor? color = null, double lineWidth = 1)

Parameters

x1 double

x of the start point, in points.

y1 double

y of the start point, in points.

x2 double

x of the end point, in points.

y2 double

y of the end point, in points.

color PdfColor?

Line colour; defaults to black.

lineWidth double

Line width, in points.

Returns

ContentStreamWriter

Exceptions

InvalidOperationException

Called inside a text object.