property Canvas

Top  Previous  Next

This property is valid if you used StartPage to open a new PDF page. If you want to close the 'Canvas' to for example draw a bitmap using DrawBitmap execute the procedure CloseCanvas. It will flush the stored graphics commands to the PDF Engine.

 

The property Canvas provides access to a TCanvas object you may use with almost any drawing code. You can use the Canvas procedures and windows API commands such as SetWorldTransform(Canvas.Handle,..).

 

Example for a graphic which was drawn to the Canvas and exported to PDF. It creates a elliptical clipping region, then rotates the pages using SetWorldTransform and prints a grid with letters.

clip0001

 

Currently you install a clipping region when the canvas has been rotated. Please create the clipping region before calling SetWorldTransform or use paths for clipping.

To enable support for clipping please activate wpClipRectSupport in the 'Modes'.