java.lang.Object | |||
↳ | com.pdftron.pdf.Annot | ||
↳ | com.pdftron.pdf.annots.Markup | ||
↳ | com.pdftron.pdf.annots.Ink |
An ink annotation (PDF 1.3) represents a freehand "scribble" composed of one or more disjoint paths. When opened, it shall display a pop-up window containing the text of the associated note.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | Ink.BlendMode |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.annots.Markup
| |||||||||||
From class
com.pdftron.pdf.Annot
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Ink(Obj d)
Creates an Ink annotation and initialize it using given Cos/SDF object.
| |||||||||||
Ink()
Creates an empty Ink annotation.
| |||||||||||
Ink(Annot annot)
Creates an Ink annotation and initialize it using given annotation object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Point |
GetPoint(int pathindex, int pointindex)
Get the specific point in the Ink List.
| ||||||||||
static Ink |
create(Doc doc, Rect pos)
Creates a new Ink annotation, in the specified document.
| ||||||||||
boolean |
erase(Point pt1, Point pt2, double eraserHalfWidth)
Erase a rectangle area formed by pt1pt2 with width
| ||||||||||
boolean |
erasePaths(Point pt1, Point pt2, double eraserHalfWidth)
Erase stroke paths that intersects the rectangle area formed by pt1pt2 with width
| ||||||||||
static boolean |
erasePoints(Obj sdfObj, Rect rect, Point pt1, Point pt2, double eraserHalfWidth)
Erase a rectangle area formed by pt1pt2 with width from the SDF object
| ||||||||||
static double[] |
getBezierControlPoints(double[] polyline)
Returns an array of Bezier Control Points for smoothing the given polyline
| ||||||||||
int |
getBlendMode()
This method is deprecated.
use
getHighlightIntent() instead.
Gets the blend mode | ||||||||||
boolean |
getHighlightIntent()
Retrieves whether the Ink will draw like a highlighter.
| ||||||||||
int |
getPathCount()
Get number of stroked pathes in the InkList.
| ||||||||||
int |
getPointCount(int pathindex)
Get number of points in a certain stroked path in the InkList.
| ||||||||||
boolean |
getSmoothing()
Gets whether smoothing should be used then refreshing the inks appearance
| ||||||||||
void |
setBlendMode(Ink.BlendMode blendMode)
This method is deprecated.
use
setHighlightIntent(boolean) instead.
Sets the blend mode | ||||||||||
void |
setHighlightIntent(boolean highlight)
Enables or disables the Ink drawing like a highlighter.
| ||||||||||
void |
setPoint(int pathindex, int pointindex, Point pt)
Set the specific point in the Ink List.
| ||||||||||
void |
setSmoothing(boolean smoothing)
Sets whether smoothing should be used then refreshing the inks appearance
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.pdf.annots.Markup
| |||||||||||
From class
com.pdftron.pdf.Annot
| |||||||||||
From class
java.lang.Object
|
Creates an Ink annotation and initialize it using given Cos/SDF object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
d | the input Cos/SDF object |
---|
Creates an empty Ink annotation.
Creates an Ink annotation and initialize it using given annotation object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
annot | the annot |
---|
PDFNetException |
---|
Get the specific point in the Ink List.
Note: The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.
pathindex | An unsigned integer indicating the index of the stroked path |
---|---|
pointindex | An unsigned integer indicating the index of the point within the stroked path indicated by the parameter "pathindex". |
PDFNetException |
---|
Creates a new Ink annotation, in the specified document.
doc | A document to which the Ink annotation is added. |
---|---|
pos | A rectangle specifying the Ink annotation's bounds, specified in user space coordinates. |
PDFNetException |
---|
Erase a rectangle area formed by pt1pt2 with width
pt1 | A point object that is one end of the eraser segment |
---|---|
pt2 | A point object that is the other end of the eraser segment |
eraserHalfWidth | The half width of the eraser |
PDFNetException |
---|
Erase stroke paths that intersects the rectangle area formed by pt1pt2 with width
pt1 | A point object that is one end of the eraser segment |
---|---|
pt2 | A point object that is the other end of the eraser segment |
eraserHalfWidth | The half width of the eraser |
PDFNetException |
---|
Erase a rectangle area formed by pt1pt2 with width from the SDF object
sdfObj | An SDF object containing points on which the erase will be performed |
---|---|
pt1 | A point object that is one end of the eraser segment |
pt2 | A point object that is the other end of the eraser segment |
eraserHalfWidth | The half width of the eraser |
PDFNetException |
---|
Returns an array of Bezier Control Points for smoothing the given polyline
polyline | A double array of points that form a polyline |
---|
PDFNetException |
---|
This method is deprecated.
use getHighlightIntent()
instead.
Gets the blend mode
PDFNetException |
---|
Retrieves whether the Ink will draw like a highlighter.
PDFNetException |
---|
Get number of stroked pathes in the InkList.
Note: The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.
PDFNetException |
---|
Get number of points in a certain stroked path in the InkList.
Note: The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.
pathindex | An unsigned integer indicating the index of the stroked path, the number of points within whom is of our interest. |
---|
PDFNetException |
---|
Gets whether smoothing should be used then refreshing the inks appearance
PDFNetException |
---|
This method is deprecated.
use setHighlightIntent(boolean)
instead.
Sets the blend mode
blendMode | The blend mode |
---|
PDFNetException |
---|
Enables or disables the Ink drawing like a highlighter.
highlight | true if the Ink will draw like a highlighter. (multiply blend mode) If false it will draw in normal mode. (normal blend mode) |
---|
PDFNetException |
---|
Set the specific point in the Ink List.
Note: The Ink list is An array of n arrays, each representing a stroked path. Each array shall be a series of Point objects specifying points along the path. When drawn, the points shall be connected by straight lines or curves in an implementation-dependent way.
pathindex | An unsigned integer indicating the index of the stroked path |
---|---|
pointindex | An unsigned integer indicating the index of the point within the stroked path indicated by the parameter "pathindex". |
pt | A Point object that is to be located by "pathindex" and "pointindex". |
PDFNetException |
---|
Sets whether smoothing should be used then refreshing the inks appearance
smoothing | A bool indicating whether smoothing should be used (true by default). |
---|
PDFNetException |
---|