DrawTextBox

Tekst, Pagina-indeling

Beschrijving

Deze functie lijkt op de functie DrawText, maar de tekst wordt binnen de opgegeven bounding box geplaatst. De verticale uitlijning kan met de parameter Options worden ingesteld en de horizontale uitlijning met de functie SetTextAlign. De tekst wordt op woordniveau afgebroken zodat deze binnen de bounding box past

Syntaxis

Delphi

Function TPDFlib.DrawTextBox(Left, Top, Width, Height: Double; Const Text: WideString; Options: Integer): Integer;

ActiveX

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

DLL

int DLDrawTextBox(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t * Text, int Options);

Parameters

LeftDe horizontale coördinaat van de linkerrand van de bounding box
TopDe verticale coördinaat van de bovenrand van de bounding box
WidthDe breedte van de bounding box
HeightDe hoogte van de begrenzingsdoos
TextDe tekst die op de pagina moet worden getekend
Options0 = Center vertical alignment 1 = Top vertical alignment 2 = Bottom vertical alignment 3 = Center vertical alignment, no wrapping 4 = Top vertical alignment, no wrapping 5 = Bottom vertical alignment, no wrapping

Retourwaarden

0De parameter Options was buiten bereik, of de parameter Width was te klein om tekst te bevatten
Non-zeroHet aantal regels tekst dat daadwerkelijk is getekend