void drawRectangle(int X, int Y, int Width, int Height)

Draws a empty rectangle. The first two parameter (X and Y) define the coordinates for the upper left corner of the rectangle. The third and forth parameter (Width and Height) define the dimension of the rectangle. The method uses the pre-defined LineWidth property for the thickness of the lines.

Example:

1
2
3
4
5
6
7
8
9
10
11
12
13
// create new PDF_Writer object
PDF_Writer.Writer PDF = new PDF_Writer.Writer();
 
PDF.LineWidth = 4;
 
// draw green filled rectangle
// Position: X=50 Y=150
// Dimension: Width=200 Height=100
// Line-Thickness: taken from PDF.LineWidth
PDF.drawRectangle(50, 150, 200, 100);
 
// save PDF document to file system
PDF.save(@"C:\PDF_Writer\test.pdf");