DrawTextBox

テキスト, ページレイアウト

説明

この関数は DrawText と似ていますが、テキストを指定した境界ボックス内に配置します。垂直揃えは Options パラメータ、水平揃えは SetTextAlign 関数で設定できます。テキストは境界ボックスに収まるように折り返されます

構文

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);

パラメータ

Left境界ボックスの左端の水平座標
Top境界ボックス上端の垂直座標
Widthバウンディングボックスの幅
Heightバウンディングボックスの高さ
Textページに描画するテキスト
Options0 = 垂直方向中央揃え 1 = 垂直方向上揃え 2 = 垂直方向下揃え 3 = 垂直方向中央揃え、折り返しなし 4 = 垂直方向上揃え、折り返しなし 5 = 垂直方向下揃え、折り返しなし

戻り値

0Options パラメーターが範囲外であるか、Width パラメーターがテキストを含めるには小さすぎます
Non-zero実際に描画されたテキスト行数