void drawFilledRectangle(int X, int Y, int Width, int Height, Color FillColor)

Draws a filled 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 last parameter defines the FillColor for the rectangle. The data type for that parameter is defined in System.Drawing.Color.

Example:

1
2
3
4
5
6
7
8
9
10
11
// create new PDF_Writer object
PDF_Writer.Writer PDF = new PDF_Writer.Writer();
 
// draw green filled rectangle
// Position: X=50 Y=150
// Dimension: Width=200 Height=100
// Fill-Color: Green
PDF.drawFilledRectangle(50, 150, 200, 100, System.Drawing.Color.Green);
 
// save PDF document to file system
PDF.save(@"C:\PDF_Writer\test.pdf");