DrawWrappedText
文字, 頁面版面配置
描述
繪製依指定寬度換行的文字。可用 SetTextAlign 函式改變文字對齊,用 SetBreakString 函式設定斷行分隔符;預設是 CR / LF 成對出現
語法
Delphi
Function TPDFlib.DrawWrappedText(XPos, YPos, Width: Double; Const Text: WideString): Integer;
ActiveX
Function PDFlib::DrawWrappedText(XPos As Double, YPos As Double, Width As Double, Text As String) As Long
DLL
int DLDrawWrappedText(int InstanceID, double XPos, double YPos, double Width, const wchar_t* Text);
int DLDrawWrappedTextA(int InstanceID, double XPos, double YPos, double Width, const char* Text);
參數
| XPos | 文字區塊的左緣 |
|---|---|
| YPos | 第一行文字的基準線 |
| Width | 文字區塊的寬度 |
| Text | 要繪製的文字 |
傳回值
換行文字繪製成功後傳回 1;Width 小於所選字型在目前文字大小下字元 W 的寬度,或字型無法提供所需字形且缺少字形時中止已啟用,則傳回 0