Namespace Annotations.SelectionAlgorithm
Represents static utility functions to determine hit testing for annotations.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
Annotations.SelectionAlgorithm.boundingRectTest(annotation, x, y)
Tests if the provided x and y coordinate is within the annotation's bounding rectangle (x, y, width, height).
|
<static> |
Annotations.SelectionAlgorithm.canvasVisibilityTest(annotation, x, y)
Tests if the provided x and y coordinate is a visible point on the canvas.
|
<static> |
Annotations.SelectionAlgorithm.textQuadTest(annotation, x, y)
Tests if the provided x and y coordinate is within a text Quad of the provided text-based annotation.
|
Method Detail
<static>
{Boolean}
Annotations.SelectionAlgorithm.boundingRectTest(annotation, x, y)
Tests if the provided x and y coordinate is within the annotation's bounding rectangle (x, y, width, height).
- Parameters:
- {Annotations.Annotation} annotation
- {number} x
- the x-coordinate of the point to test, in page coordinates
- {number} y
- the y-coordinate of the point to test, in page coordinates
- Returns:
- {Boolean} true if the provided point is a hit on the annotation
<static>
{Boolean}
Annotations.SelectionAlgorithm.canvasVisibilityTest(annotation, x, y)
Tests if the provided x and y coordinate is a visible point on the canvas.
- Parameters:
- {Annotations.Annotation} annotation
- {number} x
- the x-coordinate of the point to test, in page coordinates
- {number} y
- the y-coordinate of the point to test, in page coordinates
- Returns:
- {Boolean} true if the provided point is a hit on the annotation
<static>
{Boolean}
Annotations.SelectionAlgorithm.textQuadTest(annotation, x, y)
Tests if the provided x and y coordinate is within a text Quad of the provided text-based annotation.
- Parameters:
- {Annotations.TextMarkupAnnotation} annotation
- the text markup annotation
- {number} x
- the x-coordinate of the point to test, in page coordinates
- {number} y
- the y-coordinate of the point to test, in page coordinates
- Returns:
- {Boolean} true if the provided point is a hit on the annotation