FitRotatedTextBoxA
Text, Page layout
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to FitRotatedTextBox and string arguments are interpreted using the current SetAnsiMode code page
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 DLFitRotatedTextBoxA(InstanceID: Integer; Left, Top, Width, Height, Angle: Double; Text: PAnsiChar; Options: Integer): Integer;
DLL
int DLFitRotatedTextBoxA(int InstanceID, double Left, double Top, double Width, double Height, double Angle, const char * Text, int Options);
Parameters
| Left | The horizontal co-ordinate of the top-left corner of the box before it is rotated |
|---|---|
| Top | The vertical co-ordinate of the top-left corner of the box before it is rotated |
| Width | The width of the box before it is rotated The height of the box before it is rotated |
| Height | |
| Angle | The 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 | |
| Options | Vertical alignment: 0 = Centred 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
| 0 | The Options parameter was out of range |
|---|---|
| 1 | The rotated text box was drawn successfully |