Class CPDFCircleAnnotation

java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.CPDFCircleAnnotation

public class CPDFCircleAnnotation extends CPDFAnnotation
Circle annotation is an ellipse on the page. Despite the name "circle", a circle annotation can represent either a circle or a oval, which means the width and height of the annotation rectangle need not be equal.
  • Method Details

    • setBorderColor

      public boolean setBorderColor(int color)
      Sets the border color.
      Parameters:
      color - Color value (0x00000000~0xFFFFFFFF)
      Returns:
      Returns whether to successfully set color.
    • getBorderColor

      public int getBorderColor()
      Gets the border color.
      Returns:
      Returns the color value (0x00000000~0xFFFFFFFF)
    • setBorderAlpha

      public boolean setBorderAlpha(int lineAlpha)
      Sets the border opacity.
      Parameters:
      lineAlpha - Opacity value (0~255)
      Returns:
      Returns whether to successfully set opacity.
    • getBorderAlpha

      public int getBorderAlpha()
      Gets the border opacity.
      Returns:
      Returns opacity value (0~255)
    • setFillColor

      public boolean setFillColor(int color)
      Sets the filled color.
      Parameters:
      color - Color value (0x00000000~0xFFFFFFFF)
      Returns:
      Returns whether to successfully set filled color.
    • getFillColor

      public int getFillColor()
      Gets the filled color.
      Returns:
      Returns color value (0x00000000~0xFFFFFFFF)
    • setFillAlpha

      public boolean setFillAlpha(int bgAlpha)
      Sets the background opacity.
      Parameters:
      bgAlpha - Opacity value (0~255)
      Returns:
      Whether to successfully set opacity.
    • getFillAlpha

      public int getFillAlpha()
      Gets the background opacity.
      Returns:
      Opacity value (0~255)
    • getBorderStyle

      public CPDFBorderStyle getBorderStyle()
      Gets the border style, more: CPDFBorderStyle
      Returns:
      Returns the border style, more: CPDFBorderStyle
    • setBorderStyle

      public boolean setBorderStyle(CPDFBorderStyle borderStyle)
      Sets the border style, more: CPDFBorderStyle
      Parameters:
      borderStyle - Border styles, more: CPDFBorderStyle
      Returns:
      Whether to successfully set border style.
    • setRect

      public boolean setRect(RectF rect)
      Sets annotation rectangle. The page coordinate system has its origin at the left-bottom corner of the page, with the X-axis on the bottom going to the right, and the Y-axis on the left side going up. The device coordinate system is device dependent. For screen device, its origin is at the left-top corner of the window.
      Overrides:
      setRect in class CPDFAnnotation
      Parameters:
      rect - Rectangle on the page
      Returns:
      Returns whether to successfully set annotation rectangle.
    • getRect

      public RectF getRect()
      Gets annotation rectangle. The page coordinate system has its origin at the left-bottom corner of the page, with the X-axis on the bottom going to the right, and the Y-axis on the left side going up. The device coordinate system is device dependent. For screen device, its origin is at the left-top corner of the window.
      Overrides:
      getRect in class CPDFAnnotation
      Returns:
      Returns annotation rectangle on the page
    • updateAp

      public boolean updateAp()
      Updates annotation appearance. Call this function to update annotation appearance after modifying annotation attribute.
      Returns:
      Returns whether to successfully update annotation appearance.