Package com.compdfkit.core.annotation
Class CPDFMarkupAnnotation
java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.CPDFMarkupAnnotation
- Direct Known Subclasses:
CPDFHighlightAnnotation,CPDFSquigglyAnnotation,CPDFStrikeoutAnnotation,CPDFUnderlineAnnotation
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compdfkit.core.annotation.CPDFAnnotation
CPDFAnnotation.AppearanceType, CPDFAnnotation.Flags, CPDFAnnotation.PSOAnnotationState, CPDFAnnotation.Type -
Method Summary
Modifier and TypeMethodDescriptionintgetAlpha()Gets opacity.intgetColor()Gets color.Gets marked text.PointF[]Gets the array of quadrilateral points defining the bounds of the markup.RectF[]Gets the array of quadrilateral points defining the bounds of the markup.booleansetAlpha(int alpha) Sets opacity.booleansetColor(int color) Sets color.booleansetMarkedText(String text) Sets marked text.booleansetQuadPoints(PointF[] quadPoints) Sets the array of quadrilateral points defining the bounds of the markup.booleansetQuadRects(RectF[] quadRects) Sets the array of quadrilateral points defining the bounds of the markup.booleanupdateAp()Updates annotation appearance.Methods inherited from class com.compdfkit.core.annotation.CPDFAnnotation
addToPage, close, createReplyAnnotation, createReplyStateAnnotation, getContent, getCreationDate, getFlags, getMainAnnotNM, getName, getRecentlyModifyDate, getRect, getReplies, getState, getTitle, getType, hasAp, isAllowCorrectAnnotationAp, isExitMainAnnot, isHidden, isLocked, isMarkedStateAnnot, isReplyAnnot, isReviewStateAnnot, isValid, removeFromPage, removeFromPageIncludeReplyAnnot, setAllowCorrectAnnotationAp, setContent, setCreationDate, setFlags, setHidden, setLocked, setMarkedAnnotState, setName, setRecentlyModifyDate, setRect, setReviewAnnotState, setState, setTitle
-
Method Details
-
setQuadRects
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
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
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
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
Sets marked text.- Parameters:
text- Marked text.- Returns:
- Returns whether to successfully set marked text.
-
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.
-