Top Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.annotation

public Class PDAnnotationPolygon

extends PDAnnotationMarkup
Class Inheritance
Imports
org.apache.pdfbox.cos.COSArray, .COSBase, .COSDictionary, .COSName, org.apache.pdfbox.pdmodel.PDDocument, org.apache.pdfbox.pdmodel.graphics.color.PDColor, org.apache.pdfbox.pdmodel.interactive.annotation.handlers.PDAppearanceHandler, .PDPolygonAppearanceHandler

Author
Paul King

Field Summary

Modifier and TypeField and Description
private PDAppearanceHandler
public static final String
SUB_TYPE

The type of annotation.

Inherited from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup:
RT_GROUPRT_REPLY

Constructor Summary

AccessConstructor and Description
public
PDAnnotationPolygon()

Constructor.

public
PDAnnotationPolygon(COSDictionary
The annotations dictionary.
dict
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public void
public void
constructAppearances(PDDocument
the related document
document
)

Overrides org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.constructAppearances.

Create the appearance entry for this annotation.

public PDBorderEffectDictionary

Returns:

The border effect dictionary
getBorderEffect
()

This will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.

public PDColor

Returns:

object representing the color.
getInteriorColor
()

This will retrieve the interior color.

public float[][]

Returns:

An array of float arrays, each supplying the operands for a path building operator (m, l or c). The first array should have 2 elements, the others should have 2 or 6 elements.
getPath
()

PDF 2.0: This will retrieve the arrays that shall represent the alternating horizontal and vertical coordinates for path building.

public float[]

Returns:

An array of floats representing the alternating horizontal and vertical coordinates.
getVertices
()

This will retrieve the numbers that shall represent the alternating horizontal and vertical coordinates.

public void
setBorderEffect(PDBorderEffectDictionary
The border effect dictionary to set.
be
)

This will set the border effect dictionary, specifying effects to be applied when drawing the line.

public void
setCustomAppearanceHandler(PDAppearanceHandler
custom appearance handler
appearanceHandler
)

Set a custom appearance handler for generating the annotations appearance streams.

public void
setInteriorColor(PDColor
color.
ic
)

This will set interior color.

public void
setVertices(float[]
an array with the numbers that shall represent the alternating horizontal and vertical coordinates.
points
)

This will set the numbers that shall represent the alternating horizontal and vertical coordinates.

Inherited from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup:
getBorderStylegetConstantOpacitygetCreationDategetExternalDatagetInReplyTogetIntentgetPopupgetReplyTypegetRichContentsgetSubjectgetTitlePopupsetBorderStylesetConstantOpacitysetCreationDatesetExternalDatasetInReplyTosetIntentsetPopupsetReplyTypesetRichContentssetSubjectsetTitlePopup

Field Detail

customAppearanceHandlerback to summary
private PDAppearanceHandler customAppearanceHandler
SUB_TYPEback to summary
public static final String SUB_TYPE

The type of annotation.

Constructor Detail

PDAnnotationPolygonback to summary
public PDAnnotationPolygon()

Constructor.

PDAnnotationPolygonback to summary
public PDAnnotationPolygon(COSDictionary dict)

Constructor.

Parameters
dict:COSDictionary

The annotations dictionary.

Method Detail

constructAppearancesback to summary
public void constructAppearances()

Overrides org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.constructAppearances.

Doc from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.constructAppearances.

Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.

Annotations
@Override
constructAppearancesback to summary
public void constructAppearances(PDDocument document)

Overrides org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.constructAppearances.

Doc from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation.constructAppearances.

Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.

Parameters
document:PDDocument

the related document

Annotations
@Override
getBorderEffectback to summary
public PDBorderEffectDictionary getBorderEffect()

This will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.

Returns:PDBorderEffectDictionary

The border effect dictionary

getInteriorColorback to summary
public PDColor getInteriorColor()

This will retrieve the interior color.

Returns:PDColor

object representing the color.

getPathback to summary
public float[][] getPath()

PDF 2.0: This will retrieve the arrays that shall represent the alternating horizontal and vertical coordinates for path building.

Returns:float[][]

An array of float arrays, each supplying the operands for a path building operator (m, l or c). The first array should have 2 elements, the others should have 2 or 6 elements.

getVerticesback to summary
public float[] getVertices()

This will retrieve the numbers that shall represent the alternating horizontal and vertical coordinates.

Returns:float[]

An array of floats representing the alternating horizontal and vertical coordinates.

setBorderEffectback to summary
public void setBorderEffect(PDBorderEffectDictionary be)

This will set the border effect dictionary, specifying effects to be applied when drawing the line. This is supported by PDF 1.5 and higher.

Parameters
be:PDBorderEffectDictionary

The border effect dictionary to set.

setCustomAppearanceHandlerback to summary
public void setCustomAppearanceHandler(PDAppearanceHandler appearanceHandler)

Set a custom appearance handler for generating the annotations appearance streams.

Parameters
appearanceHandler:PDAppearanceHandler

custom appearance handler

setInteriorColorback to summary
public void setInteriorColor(PDColor ic)

This will set interior color.

Parameters
ic:PDColor

color.

setVerticesback to summary
public void setVertices(float[] points)

This will set the numbers that shall represent the alternating horizontal and vertical coordinates.

Parameters
points:float[]

an array with the numbers that shall represent the alternating horizontal and vertical coordinates.