Class PDAnnotationSquareCircle
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationSquareCircle
- All Implemented Interfaces:
COSObjectable
This is the class that represents a rectangular or eliptical annotation
Introduced in PDF 1.3 specification .
- Version:
- $Revision: 1.1 $
- Author:
- Paul King
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Constant for an Eliptical type of annotation.static final String
Constant for a Rectangular type of annotation.Fields inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
RT_GROUP, RT_REPLY, SUB_TYPE_CARET, SUB_TYPE_FREETEXT, SUB_TYPE_INK, SUB_TYPE_POLYGON, SUB_TYPE_POLYLINE, SUB_TYPE_SOUND
Fields inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
FLAG_HIDDEN, FLAG_INVISIBLE, FLAG_LOCKED, FLAG_NO_ROTATE, FLAG_NO_VIEW, FLAG_NO_ZOOM, FLAG_PRINTED, FLAG_READ_ONLY, FLAG_TOGGLE_NO_VIEW
-
Constructor Summary
ConstructorsConstructorDescriptionPDAnnotationSquareCircle
(String subType) Creates a Circle or Square annotation of the specified sub type.Creates a Line annotation from a COSDictionary, expected to be a correct object definition. -
Method Summary
Modifier and TypeMethodDescriptionThis will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.This will retrieve the interior colour of the drawn area Colour is in DeviceRGB colourspace.This will get the rectangle difference rectangle.This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.void
This will set the border effect dictionary, specifying effects to be applied when drawing the line.void
This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.void
This will set interior colour of the drawn area Colour is in DeviceRGB colourspace.void
This will set the rectangle difference rectangle.void
setSubtype
(String subType) This will set the sub type (and hence appearance, AP taking precedence) For this annotation.Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup
getConstantOpacity, getCreationDate, getExternalData, getInReplyTo, getIntent, getPopup, getReplyType, getRichContents, getSubject, getTitlePopup, setConstantOpacity, setCreationDate, setExternalData, setInReplyTo, setIntent, setPopup, setReplyType, setRichContents, setSubject, setTitlePopup
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation
createAnnotation, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceStream, getColour, getContents, getCOSObject, getDictionary, getModifiedDate, getPage, getRectangle, getStructParent, isHidden, isInvisible, isLocked, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceStream, setColour, setContents, setHidden, setInvisible, setLocked, setModifiedDate, setModifiedDate, setNoRotate, setNoView, setNoZoom, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setToggleNoView
-
Field Details
-
SUB_TYPE_SQUARE
Constant for a Rectangular type of annotation.- See Also:
-
SUB_TYPE_CIRCLE
Constant for an Eliptical type of annotation.- See Also:
-
-
Constructor Details
-
PDAnnotationSquareCircle
Creates a Circle or Square annotation of the specified sub type.- Parameters:
subType
- the subtype the annotation represents.
-
PDAnnotationSquareCircle
Creates a Line annotation from a COSDictionary, expected to be a correct object definition.- Parameters:
field
- the PDF objet to represent as a field.
-
-
Method Details
-
setInteriorColour
This will set interior colour of the drawn area Colour is in DeviceRGB colourspace.- Parameters:
ic
- colour in the DeviceRGB colourspace.
-
getInteriorColour
This will retrieve the interior colour of the drawn area Colour is in DeviceRGB colourspace.- Returns:
- PDGamma object representing the colour.
-
setBorderEffect
This will set the border effect dictionary, specifying effects to be applied when drawing the line.- Parameters:
be
- The border effect dictionary to set.
-
getBorderEffect
This will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.- Returns:
- The border effect dictionary
-
setRectDifference
This will set the rectangle difference rectangle. Giving the difference between the annotations rectangle and where the drawing occurs. (To take account of any effects applied through the BE entry forexample)- Parameters:
rd
- the rectangle difference
-
getRectDifference
This will get the rectangle difference rectangle. Giving the difference between the annotations rectangle and where the drawing occurs. (To take account of any effects applied through the BE entry forexample)- Returns:
- the rectangle difference
-
setSubtype
This will set the sub type (and hence appearance, AP taking precedence) For this annotation. See the SUB_TYPE_XXX constants for valid values.- Parameters:
subType
- The subtype of the annotation
-
getSubtype
This will retrieve the sub type (and hence appearance, AP taking precedence) For this annotation.- Overrides:
getSubtype
in classPDAnnotation
- Returns:
- The subtype of this annotation, see the SUB_TYPE_XXX constants.
-
setBorderStyle
This will set the border style dictionary, specifying the width and dash pattern used in drawing the line.- Parameters:
bs
- the border style dictionary to set. TODO not all annotations may have a BS entry
-
getBorderStyle
This will retrieve the border style dictionary, specifying the width and dash pattern used in drawing the line.- Returns:
- the border style dictionary. TODO not all annotations may have a BS entry
-