java.lang.Object | ||
↳ | com.pspdfkit.annotations.Annotation | |
↳ | com.pspdfkit.annotations.InkAnnotation |
Represents a freehand drawing on the page.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
InkAnnotation(int pageIndex)
Creates a new ink annotation.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
float |
getLineWidth()
Gets ink line width/thickness.
| ||||||||||
List<List<PointF>> |
getLines()
Returns list of lines of this Ink annotation represents.
| ||||||||||
AnnotationType |
getType()
Gets the annotation type of the annotation.
| ||||||||||
boolean |
isResizable()
Check if the annotation is resizable, or if this is a non-resizable annotation.
| ||||||||||
void |
setIsSignature(boolean isSignature)
Sets whether this annotation is an electronic signature annotation.
| ||||||||||
void |
setLineWidth(float lineWidth)
Sets ink line width/thickness.
| ||||||||||
void |
setLines(List<List<PointF>> lines)
Sets and overwrites existing list of lines for this ink annotation.
| ||||||||||
void |
updateTransformationProperties(RectF newBoundingBox, RectF oldBoundingBox)
Annotations may override this method to transform their properties (i.e.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates a new ink annotation.
pageIndex | Page to which this annotation will be attached to. |
---|
Gets ink line width/thickness.
Returns list of lines of this Ink annotation represents. A line is a list of connected points in PDF coordinates. An ink annotation may have several such disjoint lines of the same color.
Note: if you modify returned collection you must call setLines(List)
before the changes are properly applied to the document.
Gets the annotation type of the annotation.
Check if the annotation is resizable, or if this is a non-resizable annotation.
true
if the annotation can be resized (e.g. ink annotation) or false
if it is a non-resizable one (e.g. note annotation).
Sets whether this annotation is an electronic signature annotation.
isSignature | Whether or not this annotation is classed as an electronic signature. By default this is false. |
---|
Sets ink line width/thickness.
lineWidth | Line width of the ink in PDF points. |
---|
Sets and overwrites existing list of lines for this ink annotation.
lines | List of lines this ink annotation represents. |
---|
Annotations may override this method to transform their properties (i.e. points, rects, sizes) whenever the bounding box of the annotation changed.
newBoundingBox | New bounding box of the annotation (in PDF points). |
---|---|
oldBoundingBox | Old bounding box of the annotation (in PDF points). |