org.apache.pdfbox.pdmodel.fdf

## Class FDFAnnotationPolygon

- java.lang.Object
- - org.apache.pdfbox.pdmodel.fdf.FDFAnnotation
  - - org.apache.pdfbox.pdmodel.fdf.FDFAnnotationPolygon

All Implemented Interfaces:
  COSObjectable

    public class FDFAnnotationPolygon
    extends FDFAnnotation

This represents a Polygon FDF annotation.

Author:
  Ben Litchfield, Johanneke Lamberink

### Field Summary

Fields
`static String` `SUBTYPE` COS Model value for SubType entry.

### Fields inherited from class org.apache.pdfbox.pdmodel.fdf.FDFAnnotation

`annot`

### Constructor Summary

Constructors
Constructor and Description
`FDFAnnotationPolygon()` Default constructor.
`FDFAnnotationPolygon(COSDictionary a)` Constructor.
`FDFAnnotationPolygon(Element element)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`Color` `getInteriorColor()` This will get interior color of the drawn area.
`float[]` `getVertices()` This will get the coordinates of the vertices.
`void` `setInteriorColor(Color color)` This will set interior color of the drawn area.
`void` `setVertices(float[] vertices)` This will set the coordinates of the vertices.

### Methods inherited from class org.apache.pdfbox.pdmodel.fdf.FDFAnnotation

`create, getBorderEffect, getBorderStyle, getColor, getContents, getCOSObject, getCreationDate, getDate, getIntent, getName, getOpacity, getPage, getRectangle, getRichContents, getStringOrStream, getSubject, getTitle, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setBorderEffect, setBorderStyle, setColor, setContents, setCreationDate, setDate, setHidden, setIntent, setInvisible, setLocked, setLockedContents, setName, setNoRotate, setNoView, setNoZoom, setOpacity, setPage, setPrinted, setReadOnly, setRectangle, setRichContents, setSubject, setTitle, setToggleNoView`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### SUBTYPE

    public static final String SUBTYPE

COS Model value for SubType entry.

See Also:
  Constant Field Values

### Constructor Detail

#### FDFAnnotationPolygon

    public FDFAnnotationPolygon()

Default constructor.

#### FDFAnnotationPolygon

    public FDFAnnotationPolygon(COSDictionary a)

Constructor.

Parameters:
  `a` - An existing FDF Annotation.

#### FDFAnnotationPolygon

    public FDFAnnotationPolygon(Element element)
                         throws IOException

Constructor.

Parameters:
  `element` - An XFDF element.
Throws:
  `IOException` - If there is an error extracting information from the element.

### Method Detail

#### setVertices

    public final void setVertices(float[] vertices)

This will set the coordinates of the vertices.

Parameters:
  `vertices` - array of floats [x1, y1, x2, y2, ...] vertex coordinates in default user space.

#### getVertices

    public float[] getVertices()

This will get the coordinates of the vertices.

Returns:
  array of floats [x1, y1, x2, y2, ...] vertex coordinates in default user space.

#### setInteriorColor

    public final void setInteriorColor(Color color)

This will set interior color of the drawn area.

Parameters:
  `color` - The interior color of the drawn area.

#### getInteriorColor

    public Color getInteriorColor()

This will get interior color of the drawn area.

Returns:
  object representing the color.