www.gnostice.com 

AddPolygonAnnot

Top  Previous  Next

[This method is new in Gnostice eDocEngine ActiveX/.NET v2.0 Professional Edition]

 

 

The AddPolygonAnnot method is used to add a polygon annotation to the PDF document. To add a Polygon Annotation, create an instance of gtPDFPolygonAnnotX, set its properties and pass it to AddPolygonAnnot.

 

 

Syntax

 

 

[VC++]

void AddPolygonAnnot(LPDISPATCH Item);

 

[C#]

public abstract new void AddPolygonAnnot( eDocEngineX.gtPDFPolygonAnnotX Item )                

 

[VB]

Sub AddPolygonAnnot(Item As gtPDFPolygonAnnotX)

 

 

Note:  The annotation items added using this method need not be freed by the user.  All the items will be freed at the end when EndDoc is called.

 

 

Parameters

 

Item

Specifies the polygon annotation object to be added.

 

 

Example Code

 

[VC++]

CgtPDFPolygonAnnotX PolyAnnot1;

PolyAnnot1 = m_Engine.CreatePolygonAnnot();

PolyAnnot1.SetBorderStyle(brDashed);

PolyAnnot1.SetBorderWidth(3);

PolyAnnot1.SetBorderColor(RGB(50, 147, 77));

PolyAnnot1.SetContents("This Demo shows how to create a Polygon Annotation");

PolyAnnot1.SetTitle("Polygon Annot");

PolyAnnot1.SetSubject("eDocEngine Demo");

PolyAnnot1.SetRect(1, 1, 4, 2);

PolyAnnot1.SetVertices("4,7.3,5.4,8.3,4,9.3,4.4,8.3");

PolyAnnot1.SetCloudy(true);

m_Engine.AddPolygonAnnot(PolyAnnot1);

 

[C#]

gtPDFPolygonAnnotX PolyAnnot1;

PolyAnnot1 = AxgtPDFEngineX1.CreatePolygonAnnot();

PolyAnnot1.BorderColor = (uint) ColorTranslator.ToOle(Color.DarkGoldenrod );

PolyAnnot1.BorderStyle = eDocEngineX.TxgtBorderStyle.brDashed;

PolyAnnot1.BorderWidth = 3;

PolyAnnot1.Cloudy = true;

PolyAnnot1.InteriorColor =(uint) ColorTranslator.ToOle(Color.DarkBlue );

PolyAnnot1.Contents = "This Demo shows how to create a Polygon Annotation";

PolyAnnot1.Title = "Polygon Annot";

PolyAnnot1.Subject = "eDocEngine Demo";

PolyAnnot1.SetRect( 1, 1, 4, 2);

PolyAnnot1.Vertices = "4,7.3,5.4,8.3,4,9.3,4.4,8.3";

AxgtPDFEngineX1.AddPolygonAnnot(PolyAnnot1);

 

[VB]

Dim PolyAnnot1 As gtPDFPolygonAnnotX

Set PolyAnnot1 = gtEngineX1.CreatePolygonAnnot

With PolyAnnot1

.BorderColor = RGB(50, 147, 77)

.BorderStyle = brDashed

.BorderWidth = 3

.Cloudy = True

.InteriorColor = RGB(250, 247, 250)

.Contents = "This Demo shows how to create a Polygon Annotation"

.Title = "Polygon Annot"

.Subject = "eDocEngine Demo"

.SetRect 1, 1, 4, 2

.Vertices = "4,7.3,5.4,8.3,4,9.3,4.4,8.3"

End With

Call gtEngineX1.AddPolygonAnnot(PolyAnnot1)