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
xdoubleLeft edge, in points.
ydoubleBottom edge, in points.
widthdoubleWidth, in points.
heightdoubleHeight, in points.
fillPdfColor?Fill colour, or null for no fill.
strokePdfColor?Outline colour, or null for no outline.
lineWidthdoubleOutline width, in points.
Returns
Exceptions
- ArgumentException
Neither
fillnorstrokeis given.- InvalidOperationException
Called inside a text object.