Class CPDFMarkupAnnotation

java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.CPDFMarkupAnnotation
Direct Known Subclasses:
CPDFHighlightAnnotation, CPDFSquigglyAnnotation, CPDFStrikeoutAnnotation, CPDFUnderlineAnnotation

public class CPDFMarkupAnnotation extends CPDFAnnotation
  • Method Details

    • setQuadRects

      public boolean setQuadRects(RectF[] quadRects)
      Sets the array of quadrilateral points defining the bounds of the markup. 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.
      Parameters:
      quadRects - Array of quadrilateral points defining the bounds of the markup.
      Returns:
      Returns whether to successfully set the array of quadrilateral points defining the bounds of the markup.
    • getQuadRects

      public RectF[] getQuadRects()
      Gets the array of quadrilateral points defining the bounds of the markup. 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.
      Returns:
      Returns the array of quadrilateral points defining the bounds of the markup.
    • setQuadPoints

      public boolean setQuadPoints(PointF[] quadPoints)
      Sets the array of quadrilateral points defining the bounds of the markup. 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.
      Parameters:
      quadPoints - Array of quadrilateral points defining the bounds of the markup.
      Returns:
      Returns whether to successfully set the array of quadrilateral points defining the bounds of the markup.
    • getQuadPoints

      public PointF[] getQuadPoints()
      Gets the array of quadrilateral points defining the bounds of the markup. 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.
      Returns:
      Returns the array of quadrilateral points defining the bounds of the markup.
    • setMarkedText

      public boolean setMarkedText(String text)
      Sets marked text.
      Parameters:
      text - Marked text.
      Returns:
      Returns whether to successfully set marked text.
    • getMarkedText

      public String getMarkedText()
      Gets marked text.
      Returns:
      Returns marked text.
    • setColor

      public boolean setColor(int color)
      Sets color.
      Parameters:
      color - Color value (0x00000000~0xFFFFFFFF)
      Returns:
      Returns whether to successfully set color.
    • getColor

      public int getColor()
      Gets color.
      Returns:
      Returns color value (0x00000000~0xFFFFFFFF)
    • setAlpha

      public boolean setAlpha(int alpha)
      Sets opacity.
      Parameters:
      alpha - Opacity value (0~255)
      Returns:
      Returns whether to successfully set opacity.
    • getAlpha

      public int getAlpha()
      Gets opacity.
      Returns:
      Returns opacity value (0~255)
    • 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.