public class InkAnnotation extends Annotation
| Constructor and Description |
|---|
InkAnnotation(Page page,
Rect initialRect)
Create a new InkAnnotation at the end of a page's annotation array.
|
InkAnnotation(Page page,
Rect initialRect,
int addAfter)
Create a new InkAnnotation at a specific index in the page's annotation array.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addScribble(java.util.List<Point> scribble)
The vertices that define one of many scribbles in an ink annotation, in user space.
|
void |
delete() |
Form |
generateAppearance()
Generate a new appearance stream with the current annotation properties.
|
double |
getAnnotationFeatureLevel()
The minimum PDF version necessary to support the features used in this annotation.
|
java.lang.String |
getBorderStyle() |
java.util.List<java.lang.Double> |
getBorderStyleDashPattern() |
double |
getBorderStyleWidth() |
int |
getNumScribbles()
The number of scribbles in the ink annotation.
|
java.util.List<Point> |
getScribble(int index) |
void |
removeScribble(int index)
The vertices that define one of many scribbles in an ink annotation, in user space.
|
void |
setAnnotationFeatureLevel(double featureLevel)
Removes features not supported in the supplied version number.
|
void |
setBorderStyle(java.lang.String style) |
void |
setBorderStyleDashPattern(java.util.List<java.lang.Double> dashPattern) |
void |
setBorderStyleWidth(double width) |
equals, getColor, getContents, getFlags, getInteriorColor, getNormalAppearance, getOpacity, getOptionalContentMembershipDict, getPDFDict, getRect, getSubtype, getTitle, hasRichTextData, isCurrentlyVisible, setColor, setContents, setFlags, setInteriorColor, setNormalAppearance, setOpacity, setOptionalContentMembershipDict, setRect, setTitle, toStringpublic InkAnnotation(Page page, Rect initialRect)
page - The page to which the InkAnnotation is added.initialRect - A rectangle specifying the annotation's bounds, specified in user space coordinates.public InkAnnotation(Page page, Rect initialRect, int addAfter)
page - The page to which the annotation is added.initialRect - A rectangle specifying the annotation's bounds, specified in user space coordinates.addAfter - Where to add the annotation in the page's annotation array. To add the annotation to the end of the array, pass a value of -2 or use the alternate version of this constructor that does not take an index (this is generally what you should do unless you have a need to place the annotation at a special location in the array). Passing a value of -1 adds the annotation to the beginning of the array. Passing other negative values produces undefined results.public void delete()
delete in class Annotationpublic Form generateAppearance()
The resulting Form can then be used to set the annotation's appearance, such as by calling SetNormalAppearance.
generateAppearance in class Annotationpublic double getAnnotationFeatureLevel()
getAnnotationFeatureLevel in class Annotationpublic void setAnnotationFeatureLevel(double featureLevel)
setAnnotationFeatureLevel in class Annotationpublic java.util.List<Point> getScribble(int index)
index - The index of the scribble to get.public void addScribble(java.util.List<Point> scribble)
scribble - The array of points, in order, that define the vertices of the scribble in user space coordinates, to add to the ink annotation.public void removeScribble(int index)
index - The array of points, in order, that define the vertices of the scribble in user space coordinates, to remove from the ink annotation.public int getNumScribbles()
public double getBorderStyleWidth()
public void setBorderStyleWidth(double width)
public java.lang.String getBorderStyle()
public void setBorderStyle(java.lang.String style)
public java.util.List<java.lang.Double> getBorderStyleDashPattern()
public void setBorderStyleDashPattern(java.util.List<java.lang.Double> dashPattern)