THPDFPage.AddLineAnnotation

THPDFPage

 

傳回頂部  上一頁  下一頁

在目前頁面新增 Line 註解

 

Delphi 語法:

procedure AddLineAnnotation ( Contents: AnsiString; BeginPoint: THPDFCurrPoint; EndPoint: THPDFCurrPoint; Color: TColor = clRed );

THPDFCurrPoint Type Definition

TPDFCurrPoint defines a point

Unit
HPDFDoc

type
    THPDFCurrPoint = record
        X: Extended;
        Y: Extended;
end;

Description:
The THPDFCurrPoint type defines a pixel location. X specifies the horizontal coordinate of the point, Y specifies the vertical coordinate.

 

C++ 語法:

void __fastcall AddLineAnnotation ( AnsiString Contents, THPDFCurrPoint &BeginPoint, THPDFCurrPoint &EndPoint, Graphics::TColor Color );

 

說明

Use AddLineAnnotation to add new Line annotation specified text message ( Contents), begin point, end point and color on the current page.

 

Overload with line-ending styles (HotPDF v2.119.16)

procedure AddLineAnnotation ( Contents: AnsiString; BeginPoint, EndPoint: THPDFCurrPoint; BeginStyle, EndStyle: THPDFLineEndingStyle; Color: TColor = clRed );

此多載依 ISO 32000-1 §12.5.6.7 Table 175 + Table 176 輸出 PDF /LE [/<begin> /<end>] 線端陣列。檢視器隨後會轉譯所指定的端點標記(箭頭、刻度、形狀),呼叫端不必自行在頁面上繪製。THPDFLineEndingStyle 涵蓋 Table 176 的完整集合:

   lesNone — no endpoint marker (PDF spec default)
   lesSquare — filled square
   lesCircle — filled circle
   lesDiamond — filled diamond
   lesOpenArrow — open arrowhead
   lesClosedArrow — triangular closed arrowhead
   lesButt — short perpendicular tick
   lesROpenArrow — reverse-direction open arrow
   lesRClosedArrow — reverse-direction closed arrow
   lesSlash — ~30° clockwise short tick

 

Example

PDF.CurrentPage.AddLineAnnotation('Width = 120mm',
  Point1, Point2, lesClosedArrow, lesClosedArrow, clBlue);

 

Line annotation preview