org.apache.pdfbox.pdmodel.interactive.annotation

## 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

Direct Known Subclasses:
  PDAnnotationCircle, PDAnnotationSquare

    public abstract class PDAnnotationSquareCircle
    extends PDAnnotationMarkup

This is the class that represents a rectangular or elliptical annotation introduced in PDF 1.3 specification .

Author:
  Paul King

### Field Summary

### Fields inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup

`RT_GROUP, RT_REPLY`

### Constructor Summary

Constructors
`protected` `PDAnnotationSquareCircle(COSDictionary dict)` Constructor.
`protected` `PDAnnotationSquareCircle(String subType)` Creates a Circle or Square annotation of the specified sub type.

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`abstract void` `constructAppearances()` Create the appearance entry for this annotation.
`PDBorderEffectDictionary` `getBorderEffect()` This will retrieve the border effect dictionary, specifying effects to be applied used in drawing the line.
`PDColor` `getInteriorColor()` This will retrieve the interior color of the drawn area color is in DeviceRGB color space.
`PDRectangle` `getRectDifference()` This will get the rectangle difference rectangle.
`float[]` `getRectDifferences()` This will get the differences between the annotations "outer" rectangle defined by /Rect and the border.
`void` `setBorderEffect(PDBorderEffectDictionary be)` This will set the border effect dictionary, specifying effects to be applied when drawing the line.
`void` `setInteriorColor(PDColor ic)` This will set interior color of the drawn area color is in DeviceRGB colorspace.
`void` `setRectDifference(PDRectangle rd)` This will set the rectangle difference rectangle.
`void` `setRectDifferences(float difference)` This will set the difference between the annotations "outer" rectangle defined by /Rect and the border.
`void` `setRectDifferences(float differenceLeft, float differenceTop, float differenceRight, float differenceBottom)` This will set the difference between the annotations "outer" rectangle defined by /Rect and the border.

### Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup

`getBorderStyle, getConstantOpacity, getCreationDate, getExternalData, getInReplyTo, getIntent, getPopup, getReplyType, getRichContents, getSubject, getTitlePopup, setBorderStyle, setConstantOpacity, setCreationDate, setExternalData, setInReplyTo, setIntent, setPopup, setReplyType, setRichContents, setSubject, setTitlePopup`

### Methods inherited from class org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation

`constructAppearances, createAnnotation, equals, getAnnotationFlags, getAnnotationName, getAppearance, getAppearanceState, getBorder, getColor, getColor, getContents, getCOSObject, getModifiedDate, getNormalAppearanceStream, getOptionalContent, getPage, getRectangle, getStructParent, getSubtype, hashCode, isHidden, isInvisible, isLocked, isLockedContents, isNoRotate, isNoView, isNoZoom, isPrinted, isReadOnly, isToggleNoView, setAnnotationFlags, setAnnotationName, setAppearance, setAppearanceState, setBorder, setColor, setContents, setHidden, setInvisible, setLocked, setLockedContents, setModifiedDate, setModifiedDate, setNoRotate, setNoView, setNoZoom, setOptionalContent, setPage, setPrinted, setReadOnly, setRectangle, setStructParent, setSubtype, setToggleNoView`

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

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

### Constructor Detail

#### PDAnnotationSquareCircle

    protected PDAnnotationSquareCircle(String subType)

Creates a Circle or Square annotation of the specified sub type.

Parameters:
  `subType` - the subtype the annotation represents.

#### PDAnnotationSquareCircle

    protected PDAnnotationSquareCircle(COSDictionary dict)

Constructor.

Parameters:
  `dict` - The annotations dictionary.

### Method Detail

#### constructAppearances

    public abstract void constructAppearances()

Description copied from class: `PDAnnotation`
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.

Overrides:
  `constructAppearances` in class `PDAnnotation`

#### setInteriorColor

    public void setInteriorColor(PDColor ic)

This will set interior color of the drawn area color is in DeviceRGB colorspace.

Parameters:
  `ic` - color in the DeviceRGB color space.

#### getInteriorColor

    public PDColor getInteriorColor()

This will retrieve the interior color of the drawn area color is in DeviceRGB color space.

Returns:
  object representing the color.

#### setBorderEffect

    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` - The border effect dictionary to set.

#### getBorderEffect

    public PDBorderEffectDictionary getBorderEffect()

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

Returns:
  The border effect dictionary

#### setRectDifference

    public void setRectDifference(PDRectangle rd)

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 for example)

Parameters:
  `rd` - the rectangle difference

#### getRectDifference

    public PDRectangle 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 for example)

Returns:
  the rectangle difference

#### setRectDifferences

    public void setRectDifferences(float difference)

This will set the difference between the annotations "outer" rectangle defined by /Rect and the border.

This will set an equal difference for all sides

Parameters:
  `difference` - from the annotations /Rect entry

#### setRectDifferences

    public void setRectDifferences(float differenceLeft,
                                   float differenceTop,
                                   float differenceRight,
                                   float differenceBottom)

This will set the difference between the annotations "outer" rectangle defined by /Rect and the border.

Parameters:
  `differenceLeft` - left difference from the annotations /Rect entry
  `differenceTop` - top difference from the annotations /Rect entry
  `differenceRight` - right difference from the annotations /Rect entry
  `differenceBottom` - bottom difference from the annotations /Rect entry

#### getRectDifferences

    public float[] getRectDifferences()

This will get the differences between the annotations "outer" rectangle defined by /Rect and the border.

Returns:
  the differences. If the entry hasn't been set am empty array is returned.