FitTextBox
テキスト, ページレイアウト
説明
DrawText 関数と似ていますが、すべてのテキストが利用可能な領域に収まるようにテキストサイズが調整されます
構文
Delphi
Function TPDFlib.FitTextBox(Left, Top, Width, Height: Double; Const Text: WideString; Options: Integer): Integer;
ActiveX
Function PDFlib::FitTextBox(Left As Double, Top As Double, Width As Double, Height As Double, Text As String, Options As Long) As Long
DLL
int DLFitTextBox(int InstanceID, double Left, double Top, double Width, double Height, const wchar_t * Text, int Options);
パラメータ
| Left | 境界ボックスの左端の水平座標 |
|---|---|
| Top | 境界ボックス上端の垂直座標 |
| Width | バウンディングボックスの幅 |
| Height | 境界ボックスの高さ ボックス内に表示するテキスト |
| Text | |
| Options | 垂直配置: 0 = 中央 1 = 上 2 = 下 これらの値に 100 を加えると長い単語は分割されず、最も長い単語が使用可能幅に収まるまでフォントサイズが縮小されます これらの値に 1000 を加えると、テキストが使用可能領域を満たすまでフォントサイズを拡大できます |
戻り値
| 0 | 指定した Options が範囲外でした |
|---|---|
| 1 | テキストが正常に描画されました |