Class 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 .
  • Constructor Details

    • 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 Details

    • 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.