Class Annotations.IPathAnnotation
Extends
Annotations.Annotation.
Constructor Attributes | Constructor Name and Description |
---|---|
An abstract annotation class for aiding the creation of path-based annotations.
|
- Fields borrowed from class Annotations.Annotation:
- Author, Custom, DateModified, elementName, Height, Hidden, Id, IsAdded, IsDeleted, IsModified, NoMove, NoResize, NoRotate, NoZoom, PageNumber, Subject, Width, X, Y
Method Attributes | Method Name and Description |
---|---|
addPathPoint(x, y)
Adds a point to the path
|
|
Recalculate the width and height of the annotation
|
|
getPath()
Gets the path array
|
|
getPathPoint(index)
Gets the point in the path at the specified index
|
|
popPath()
Removes the last point from the path
|
|
setPathPoint(index, x, y)
Sets the path point at a specific index
|
- Methods borrowed from class Annotations.Annotation:
- deserialize, draw, GetBottom, getContents, GetCustom, getFlag, GetHeight, GetLeft, GetPageNumber, GetPopupComment, getRect, getRectPadding, getReplies, GetRight, GetTop, GetWidth, GetX, GetY, isReply, resize, serialize, setContents, SetCustom, setFlag, SetHeight, SetPageNumber, SetPopupComment, setRect, SetWidth, SetX, SetY
Class Detail
Annotations.IPathAnnotation()
An abstract annotation class for aiding the creation of path-based annotations.
Classes extending IPathAnnotation or implements the interface can be used by the PathTools.
Note: this class makes no assumptions on serialization
Method Detail
addPathPoint(x, y)
Adds a point to the path
- Parameters:
- {number} x
- The x coordinate of the point
- {number} y
- The y coordinate of the point
adjustRect()
Recalculate the width and height of the annotation
{array}
getPath()
Gets the path array
- Returns:
- {array} The array of path points
{object}
getPathPoint(index)
Gets the point in the path at the specified index
- Parameters:
- {number} index
- The index in the path array
- Returns:
- {object} The path point as an object with x and y properties
popPath()
Removes the last point from the path
setPathPoint(index, x, y)
Sets the path point at a specific index
- Parameters:
- {number} index
- The index in the path array to set
- {number} x
- The x coordinate of the point
- {number} y
- The y coordinate of the point