ClosePath
向量圖形, 路徑定義和繪製
說明
本頁介紹 PDFlibPas 中屬於「向量圖形, 路徑定義和繪製」主題的 ClosePath。API 名稱、參數、類別名稱、檔案名稱和字面值保持原樣,以便和 Delphi 函式庫及 DLL 進入點完全對應。
呼叫函式前請查看語法、參數和傳回值。程式碼區塊保留原始形式,便於範例直接複製使用。 StartPath, DrawPath, DrawPathEvenOdd
語法
Delphi
Function TPDFlib.ClosePath: Integer;
ActiveX
Function PDFlib::ClosePath() As Long
DLL
int DLClosePath(int InstanceID);
傳回值
| 0 | 此值說明 ClosePath 的呼叫結果。通常非零值表示成功,0 表示操作未完成。 |
|---|---|
| 1 | 此值說明 ClosePath 的呼叫結果。通常非零值表示成功,0 表示操作未完成。 |
備註
呼叫函式前請查看語法、參數和傳回值。程式碼區塊保留原始形式,便於範例直接複製使用。 StartPath
範例
// Draw a closed triangle, stroked
PDF.SetStrokeColor(0, 0, 0);
PDF.SetLineWidth(1);
PDF.StartPath(100, 100);
PDF.AddLineToPath(200, 100);
PDF.AddLineToPath(150, 180);
PDF.ClosePath; // line back to (100, 100)
PDF.DrawPath(0); // 0 = outline only另請參閱
StartPath, AddLineToPath, AddCurveToPath, DrawPath, DrawPathEvenOdd