FitRotatedTextBox

Text, Page layout

Description

Similar to the FitTextBox function, but the angle of the box can be rotated by any angle. The text size is adjusted to ensure that all the text fits into the available space. The top-left corner of the box before it is rotated is used as the rotation point.

Syntax

Delphi

function TPDFlib.FitRotatedTextBox(Left, Top, Width, Height, Angle: Double; Const Text: WideString; Options: Integer): Integer;

ActiveX

Function PDFlib::FitRotatedTextBox(Left As Double, Top As Double, Width As Double, Height As Double, Angle As Double, Text As String, Options As Long) As Long

DLL

int DLFitRotatedTextBox(int InstanceID, double Left, double Top, double Width, double Height, double Angle, wchar_t * Text, int Options);

Parameters

LeftThe horizontal co-ordinate of the top-left corner of the box before it is rotated
TopThe vertical co-ordinate of the top-left corner of the box before it is rotated
WidthThe width of the box before it is rotated The height of the box before it is rotated
Height
AngleThe angle in degrees that the box should be rotated by. A positive angle rotates the box in an anti-clockwise direction, a negative angle rotated the box in a clockwise direction. The text that will be fitted into the box
Text
OptionsVertical alignment: 0 = Centered 1 = Top 2 = Bottom If 100 is added to these values long words will not be split up, the font size will be reduced until the longest word fits into the available width. If 1000 is addd to these values the font size will be allowed to increase until the text fills the available area.

Return values

0The Options parameter was out of range
1The rotated text box was drawn successfully