Debenu Quick PDF logo

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 TDebenuPDFLibrary1811.FitRotatedTextBox(Left, Top, Width, Height, 
  Angle: Double; Text: WideString; Options: Integer): Integer;

ActiveX

Function DebenuPDFLibrary1811.PDFLibrary::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 DPLFitRotatedTextBox(int InstanceID, double Left, double Top, double Width,
  double Height, double Angle, wchar_t * 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
Height The height of the box before it is rotated
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.
Text The text that will be fitted into the box
Options Vertical 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

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

Copyright © 2020 Debenu. All rights reserved. AboutContactBlogNewsletterSupport