Class Annotations.FreeHandAnnotation
Extends
Annotations.IPathAnnotation.
Constructor Attributes | Constructor Name and Description |
---|---|
Represents a FreeHand annotation.
|
Field Attributes | Field Name and Description |
---|---|
The bottommost point of the annotation.
|
|
The leftmost point of the annotation.
|
|
The rightmost point of the annotation.
|
|
Whether to simplify the path points or not.
|
|
The topmost point of the annotation.
|
- 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, pathIndex)
Adds a point to the specified path.
|
|
getPath(pathIndex)
Gets the specified path in the path array.
|
|
getPathPoint(index, pathIndex)
Gets the specified point in the path at the specified index.
|
|
popPath(pathIndex)
Removes the last point from the specified path.
|
|
setPath(path, pathIndex)
Sets a path in the path array.
|
|
setPathPoint(index, x, y, pathIndex)
Sets a point at the specified path.
|
- Methods borrowed from class Annotations.IPathAnnotation:
- adjustRect
- 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
Field Detail
{number}
BottomMost
The bottommost point of the annotation.
{number}
LeftMost
The leftmost point of the annotation.
{number}
RightMost
The rightmost point of the annotation.
{boolean}
ShouldSimplifyPath
Whether to simplify the path points or not. (defaults to true)
{number}
TopMost
The topmost point of the annotation.
Method Detail
addPathPoint(x, y, pathIndex)
Adds a point to the specified path.
This method will create a new path if the specified path index is equal to the total number of existings paths, and set the x and y value as its first point.
- Parameters:
- {number} x
- The x coordinate of the point
- {number} y
- The y coordinate of the point
- {number} pathIndex
- The index of the path, defaults to 0
{array}
getPath(pathIndex)
Gets the specified path in the path array.
- Parameters:
- {number} pathIndex
- The index of the path, defaults to 0
- Returns:
- {array} The array of path points
{Annotations.Point}
getPathPoint(index, pathIndex)
Gets the specified point in the path at the specified index.
- Parameters:
- {number} index
- The index of the point in the specified path
- {number} pathIndex
- The index of the path, defaults to 0
- Returns:
- {Annotations.Point} The path point as an object with x and y properties
{Annotations.Point}
popPath(pathIndex)
Removes the last point from the specified path.
- Parameters:
- {number} pathIndex
- The index of the path, defaults to 0
- Returns:
- {Annotations.Point} The point that was removed from the path.
setPath(path, pathIndex)
Sets a path in the path array.
- Parameters:
- {array} path
- An array of Annotation.Point objects.
- {number} pathIndex
- The index of the path, defaults to 0
setPathPoint(index, x, y, pathIndex)
Sets a point at the specified path.
This method will create a new path if the specified path index is equal to the total number of existings paths, and set the x and y value as its first point.
- 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
- {number} pathIndex
- The index of the path, defaults to 0