Package com.compdfkit.core.annotation
Class CPDFCircleAnnotation
java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.CPDFCircleAnnotation
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.
-
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 TypeMethodDescriptionintGets the border opacity.intGets the border color.Gets the border style, more:CPDFBorderStyleintGets the background opacity.intGets the filled color.getRect()Gets annotation rectangle.booleansetBorderAlpha(int lineAlpha) Sets the border opacity.booleansetBorderColor(int color) Sets the border color.booleansetBorderStyle(CPDFBorderStyle borderStyle) Sets the border style, more:CPDFBorderStylebooleansetFillAlpha(int bgAlpha) Sets the background opacity.booleansetFillColor(int color) Sets the filled color.booleanSets annotation rectangle.booleanupdateAp()Updates annotation appearance.Methods inherited from class com.compdfkit.core.annotation.CPDFAnnotation
addToPage, close, createReplyAnnotation, createReplyStateAnnotation, getContent, getCreationDate, getFlags, getMainAnnotNM, getName, getRecentlyModifyDate, getReplies, getState, getTitle, getType, hasAp, isAllowCorrectAnnotationAp, isExitMainAnnot, isHidden, isLocked, isMarkedStateAnnot, isReplyAnnot, isReviewStateAnnot, isValid, removeFromPage, removeFromPageIncludeReplyAnnot, setAllowCorrectAnnotationAp, setContent, setCreationDate, setFlags, setHidden, setLocked, setMarkedAnnotState, setName, setRecentlyModifyDate, setReviewAnnotState, setState, setTitle
-
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
Gets the border style, more:CPDFBorderStyle- Returns:
- Returns the border style, more:
CPDFBorderStyle
-
setBorderStyle
Sets the border style, more:CPDFBorderStyle- Parameters:
borderStyle- Border styles, more:CPDFBorderStyle- Returns:
- Whether to successfully set border style.
-
setRect
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:
setRectin classCPDFAnnotation- Parameters:
rect- Rectangle on the page- Returns:
- Returns whether to successfully set annotation rectangle.
-
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:
getRectin classCPDFAnnotation- 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.
-