Class PDFNet.InkAnnot
PDFNet.InkAnnot
Constructor Attributes | Constructor Name and Description |
---|---|
PDFNet.InkAnnot(id)
An ink annotation (PDF 1.3) represents a freehand "scribble" composed
of one or more disjoint paths.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
PDFNet.InkAnnot.create(doc, pos)
Creates a new Ink annotation in the specified document.
|
<static> |
PDFNet.InkAnnot.createFromAnnot(ann)
creates an Ink annotation and initializes it using given annotation object.
|
<static> |
PDFNet.InkAnnot.createFromObj(d)
creates an Ink annotation and initializes it using given Cos/SDF object.
|
erase(pt1, pt2, width)
Erase a rectangle area formed by pt1pt2 with width
|
|
Returns number of paths in the annotation.
|
|
getPoint(pathindex, pointindex)
Returns the specific point in a given path.
|
|
getPointCount(pathindex)
Returns number of points in a certain stroked path in the InkList.
|
|
setPoint(pathindex, pointindex, pt)
sets the specific point in the Ink List, adding it if needed.
|
Class Detail
PDFNet.InkAnnot(id)
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.
- Parameters:
- id
Method Detail
<static>
{InkAnnot}
PDFNet.InkAnnot.create(doc, pos)
Creates a new Ink annotation in the specified document.
- Parameters:
- {SDFDoc} doc
- A document to which the Ink annotation is added.
- {rect} pos
- A rectangle specifying the Ink annotation's bounds in default user space units.
- Returns:
- {InkAnnot} A promise that resolves to a newly created blank Ink annotation.
<static>
{InkAnnot}
PDFNet.InkAnnot.createFromAnnot(ann)
creates an Ink annotation and initializes it using given annotation object.
- Parameters:
- {Annot} ann
- Annot object used to initialize the Ink annotation.
- Returns:
- {InkAnnot} A promise that resolves to an object of type: "InkAnnot" (generated documentation)
<static>
{InkAnnot}
PDFNet.InkAnnot.createFromObj(d)
creates an Ink annotation and initializes it using given Cos/SDF object.
- Parameters:
- {Obj} d
- The Cos/SDF object to initialze the annotation with.
- Returns:
- {InkAnnot} A promise that resolves to an object of type: "InkAnnot" (generated documentation)
{boolean}
erase(pt1, pt2, width)
Erase a rectangle area formed by pt1pt2 with width
- Parameters:
- {point} pt1
- A point object that is one end of the eraser segment
- {point} pt2
- A point object that is the other end of the eraser segment
- {number} width
- The half width of the eraser
- Returns:
- {boolean} A promise that resolves to whether an ink stroke was erased
{number}
getPathCount()
Returns number of paths in the annotation.
- Returns:
- {number} A promise that resolves to an integer representing the number of paths in the 'InkList' entry of the annotation dictionary.
{point}
getPoint(pathindex, pointindex)
Returns the specific point in a given path.
- Parameters:
- {number} pathindex
- path index for each the point is returned. Index starts at 0.
- {number} pointindex
- index of point in the path. Index starts at 0.
- Returns:
- {point} A promise that resolves to a Point object for specified path and point index.
{number}
getPointCount(pathindex)
Returns number of points in a certain stroked path in the InkList.
- Parameters:
- {number} pathindex
- path index for each the point count is returned. Index starts at 0.
- Returns:
- {number} A promise that resolves to an integer representing the number of points in the stroked path of the Ink list.
- See:
- GetPathCount()
setPoint(pathindex, pointindex, pt)
sets the specific point in the Ink List, adding it if needed.
- Parameters:
- {number} pathindex
- An unsigned integer indicating the index of the path.
- {number} pointindex
- An unsigned integer indicating the index of the point within the stroked path indicated by the parameter "pathindex".
- {point} pt
- A Point object that is to be assigned.