PolygonAnnotation

Inheritance: java.lang.Object, com.aspose.pdf.BaseParagraph, com.aspose.pdf.Annotation, com.aspose.pdf.MarkupAnnotation, com.aspose.pdf.PolyAnnotation

public final class PolygonAnnotation extends PolyAnnotation

Class representing polygon annotation.

Constructors

ConstructorDescription
PolygonAnnotation(IDocument document, Point[] vertices)Constructor for using with Generator.
PolygonAnnotation(Page page, Rectangle rect, Point[] vertices)Creates new Polygon annotation on the specified page.

Methods

MethodDescription
accept(AnnotationSelector visitor)Accepts visitor object for annotation processing.
getAnnotationType()Gets type of annotation.

PolygonAnnotation(IDocument document, Point[] vertices)

public PolygonAnnotation(IDocument document, Point[] vertices)

Constructor for using with Generator.

Parameters:

ParameterTypeDescription
documentIDocumentDocument where annotation will be added.
verticesPoint[]Array of points.

PolygonAnnotation(Page page, Rectangle rect, Point[] vertices)

public PolygonAnnotation(Page page, Rectangle rect, Point[] vertices)

Creates new Polygon annotation on the specified page.

Parameters:

ParameterTypeDescription
pagePageThe document’s page where annotation should be created.
rectRectangleThe annotation rectangle, defining the location of the annotation on the page.
verticesPoint[]An array of polygon vertices points.

accept(AnnotationSelector visitor)

public void accept(AnnotationSelector visitor)

Accepts visitor object for annotation processing.

Parameters:

ParameterTypeDescription
visitorAnnotationSelectorVisitor object.

getAnnotationType()

public AnnotationType getAnnotationType()

Gets type of annotation.

Returns: AnnotationType - AnnotationType element