Package com.compdfkit.core.annotation
Class CPDFLineAnnotation
java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.CPDFLineAnnotation
A TPDFLineAnnotation object displays a single line on a page.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.compdfkit.core.annotation.CPDFAnnotation
CPDFAnnotation.AppearanceType, CPDFAnnotation.Flags, CPDFAnnotation.PSOAnnotationState, CPDFAnnotation.Type -
Method Summary
Modifier and TypeMethodDescriptionintGets fill opacity of line.intGets line color.Gets border style.intGets fill opacity of line.intGets fill color of line.Gets the line style for the starting point of the line, more:CPDFLineAnnotation.LineTypePointF[]Gets start point and end point of the line.Gets the line style for the ending point of the line, more:CPDFLineAnnotation.LineTypegetRect()Gets annotation rectangle.booleansetBorderAlpha(int lineAlpha) Sets line opacity.booleansetBorderColor(int color) Sets line color.booleansetBorderStyle(CPDFBorderStyle borderStyle) Sets border style.booleansetFillAlpha(int fillAlpha) Sets fill opacity of line.booleansetFillColor(int color) Sets fill color of line.booleansetLinePoints(PointF start, PointF end) Sets start point and end point of the line.booleanSets the line style for the starting point and ending point of the line, more:CPDFLineAnnotation.LineTypebooleanSets 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
-
setLinePoints
Sets start point and end point of the line.- Parameters:
start- Start point of the line.end- End point of the line.- Returns:
- Returns whether to successfully set the start point and end point of the line.
-
getLinePoints
Gets start point and end point of the line.- Returns:
- Returns an array of length 2, the first element is start point, the second element is the end point.
-
setLineType
Sets the line style for the starting point and ending point of the line, more:CPDFLineAnnotation.LineType- Parameters:
start- Line style for the starting point, more:CPDFLineAnnotation.LineTypeend- Line style for the ending point, more:CPDFLineAnnotation.LineType- Returns:
- Returns whether to successfully set the line style for the starting point and ending point of the line.
-
getLineHeadType
Gets the line style for the starting point of the line, more:CPDFLineAnnotation.LineType- Returns:
- Returns the line style for the starting point of the line, more:
CPDFLineAnnotation.LineType
-
getLineTailType
Gets the line style for the ending point of the line, more:CPDFLineAnnotation.LineType- Returns:
- Returns the line style for the ending point of the line, more:
CPDFLineAnnotation.LineType
-
setBorderColor
public boolean setBorderColor(int color) Sets line color.- Parameters:
color- Color value (0x00000000~0xFFFFFFFF)- Returns:
- Returns whether to successfully set color.
-
getBorderColor
public int getBorderColor()Gets line color.- Returns:
- Returns color value (0x00000000~0xFFFFFFFF)
-
setFillColor
public boolean setFillColor(int color) Sets fill color of line.- Parameters:
color- Color value (0x00000000~0xFFFFFFFF)- Returns:
- Returns whether to successfully set fill color of line.
-
getFillColor
public int getFillColor()Gets fill color of line.- Returns:
- Returns fill color value(0x00000000~0xFFFFFFFF)
-
setBorderAlpha
public boolean setBorderAlpha(int lineAlpha) Sets line opacity.- Parameters:
lineAlpha- Opacity value (0~255)- Returns:
- Returns whether to successfully set opacity.
-
getFillAlpha
public int getFillAlpha()Gets fill opacity of line.- Returns:
- Returns line fill opacity value (0~255)
-
setFillAlpha
public boolean setFillAlpha(int fillAlpha) Sets fill opacity of line.- Parameters:
fillAlpha- Opacity value (0~255)- Returns:
- Returns whether to successfully set fill opacity of line.
-
getBorderAlpha
public int getBorderAlpha()Gets fill opacity of line.- Returns:
- Returns line fill opacity value (0~255)
-
getBorderStyle
Gets border style.- Returns:
- Returns border style.
-
setBorderStyle
Sets border style.- Parameters:
borderStyle- Border style.- Returns:
- 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 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.
-