Method DrawRectangle

Namespace
SoftZenPdf
Assembly
SoftZenPdf.dll

DrawRectangle(double, double, double, double, PdfColor?, PdfColor?, double)

Draws a rectangle, filled, outlined or both.

public ContentStreamWriter DrawRectangle(double x, double y, double width, double height, PdfColor? fill = null, PdfColor? stroke = null, double lineWidth = 1)

Parameters

x double

Left edge, in points.

y double

Bottom edge, in points.

width double

Width, in points.

height double

Height, in points.

fill PdfColor?

Fill colour, or null for no fill.

stroke PdfColor?

Outline colour, or null for no outline.

lineWidth double

Outline width, in points.

Returns

ContentStreamWriter

Exceptions

ArgumentException

Neither fill nor stroke is given.

InvalidOperationException

Called inside a text object.