new RotationControlHandle(width, height, offset, annotation)
Creates a new rotation control handle
Parameters:
Name | Type | Description |
---|---|---|
width |
number | The width of the handle |
height |
number | The height of the handle |
offset |
number | The minimum offset the control handle will be from the selection box |
annotation |
Annotations.Annotation | The annotation bound to this control handle |
Extends
Methods
-
draw(ctx, annotation, selectionBox, zoom)
-
Draws the control handle's appearance on the provided canvas context
Parameters:
Name Type Description ctx
CanvasRenderingContext2D the annotation canvas context annotation
Annotations.Annotation the annotation to modify selectionBox
CoreControls.Math.Rect the selection rect zoom
number the current zoom level of the document - Inherited From:
-
testSelection(annotation, selectionBox, zoom, x, y)
-
Determines if the provided point is a hit on the control handle. See Annotations.SelectionAlgorithm for usuable selection algorithms.
Parameters:
Name Type Description annotation
Annotations.Annotation the annotation selectionBox
CoreControls.Math.Rect the selection rect zoom
number the current zoom level of the document x
number the x-coordinate of the point to test, in page coordinates y
number the y-coordinate of the point to test, in page coordinates - Inherited From:
Returns:
true if the provided point is a hit- Type
- boolean