eDocEngine VCL Professional Help » Symbol Reference » Namespaces of Helper Classes » gtExPDFEng Namespace » TgtPDFInkAnnot Class
Gnostice eDocEngine VCL Developer Guide
|
This class represents an ink annotation.
public TgtPDFInkAnnot = class(TgtPDFAnnot);
public: class TgtPDFInkAnnot : public TgtPDFAnnot;
An ink-annotation is identified by a "free-hand scribble" made up of one or more lines. The lines are specified by the x-y coordinates of their vertices. The free-hand scribble does not contain any sharp kinks or turns. It is drawn as if the drawing gains moment over the length of the lines connecting the vertices.
gtExPDFEng
procedure TForm1.Demo_TgtPDFInkAnnot; var gtPDFInkAnnot1: TgtPDFInkAnnot; arrVertices: Array [0 .. 4] of TgtPoint; i: Integer; gtPDFEngine1: TgtPDFEngine; begin gtPDFEngine1 := TgtPDFEngine.Create(Nil); // Specify vertices for an ink annotation arrVertices[0].X := 100; arrVertices[0].Y := 100; arrVertices[1].X := 300; arrVertices[1].Y := 400; arrVertices[2].X := 500; arrVertices[2].Y := 300; arrVertices[3].X := 200; arrVertices[3].Y := 150; arrVertices[4].X := 600; arrVertices[4].Y := 450; // Create an ink annotation gtPDFInkAnnot1 := TgtPDFInkAnnot.Create; gtPDFInkAnnot1.SetInkPoints(arrVertices); gtPDFInkAnnot1.Contents := 'Looks like a free-hand scribble, isn''t it?'; gtPDFInkAnnot1.Title := 'Ink Annotation Demo'; with gtPDFEngine1 do begin Preferences.ShowSetupDialog := False; Preferences.OpenAfterCreate := True; FileName := 'ink_annotation.pdf'; MeasurementUnit := muPixels; // Create a PDF document BeginDoc; Font.Size := 18; // Mark the vertices for i := 0 to 4 do begin TextOut(arrVertices[i].X, arrVertices[i].Y, 'x (' + FloatToStr(arrVertices[i].X) + ', ' + FloatToStr (arrVertices[i].Y) + ')'); end; // Add the ink annotation to the current page AddAnnotItem(gtPDFInkAnnot1); // Save the PDF document EndDoc; end; end;
|
Name |
Description |
![]() |
Specifies border color of the annotation. | |
![]() |
Specifies text that needs to be used as the contents of the annotation's popup window. | |
![]() |
Specifies text that needs to be used as the subject in the annotation's popup window. | |
![]() |
Specifies text that needs to be used as the title in the annotation's popup window. |
|
Name |
Description |
![]() |
Creates a new instance of this class. | |
![]() ![]() |
Destroys this instance. | |
![]() |
Specifies vertices linking the lines that make up the annotation. |