public class

Polygon

extends PolyLine
java.lang.Object
   ↳ com.pdftron.pdf.Annot
     ↳ com.pdftron.pdf.annots.Markup
       ↳ com.pdftron.pdf.annots.Line
         ↳ com.pdftron.pdf.annots.PolyLine
           ↳ com.pdftron.pdf.annots.Polygon

Class Overview

The Polygon class.

Summary

[Expand]
Inherited Constants
From class com.pdftron.pdf.annots.PolyLine
From class com.pdftron.pdf.annots.Line
From class com.pdftron.pdf.annots.Markup
From class com.pdftron.pdf.Annot
Public Constructors
Polygon()
Creates an empty Polygon annotation.
Polygon(Annot annot)
Creates a PolyLine annotation and initialize it using given annotation object.
Polygon(Obj obj)
Creates a Polygon annotation and initialize it using given Cos/SDF object.
Public Methods
static Polygon create(Doc doc, Rect pos)
Creates a new Polygon annotation, in the specified document.
[Expand]
Inherited Methods
From class com.pdftron.pdf.annots.PolyLine
From class com.pdftron.pdf.annots.Line
From class com.pdftron.pdf.annots.Markup
From class com.pdftron.pdf.Annot
From class java.lang.Object

Public Constructors

public Polygon ()

Creates an empty Polygon annotation.

public Polygon (Annot annot)

Creates a PolyLine annotation and initialize it using given annotation object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
annot The annotation object

public Polygon (Obj obj)

Creates a Polygon annotation and initialize it using given Cos/SDF object.

Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.

Parameters
obj The input Cos/SDF object.

Public Methods

public static Polygon create (Doc doc, Rect pos)

Creates a new Polygon annotation, in the specified document.

Parameters
doc A document to which the Polygon annotation is added.
pos A rectangle specifying the Polygon annotation's bounds, specified in user space coordinates.
Returns
  • A newly created blank Polygon annotation.