THPDFPage.RectangleRotate Method

 

THPDFPage.RectangleRotate

THPDFPage

 

Top  Previous  Next

Draws a rotated rectangle.

 

Delphi syntax:

procedure RectangleRotate (X, Y, Width, Height: Single; Angle: Extended);

 

C++ syntax:

void __fastcall RectangleRotate ( float X, float Y, float Width, float Height, Extended Angle );

 

Description

Use RectangleRotate to add a rotated rectangle to the current path. ( X, Y) is the corner the rectangle turns around, Width and Height give its size, and angle is the rotation in degrees. The rectangle is a closed subpath, just like one added by Rectangle, so stroking it draws all four sides

To fill a rectangular region use Fill. To outline a rectangular region without filling it, use Stroke. To draw a rectangle with rounded corners, use RoundRect.

 

Code Example

HPDF.CurrentPage.RectangleRotate( 100, 100, 150, 75, 30 );    // Rotated rectangle
HPDF.CurrentPage.Stroke;