Function: rotateHandle()
rotateHandle(
box,toScreen?,distance?):object
Defined in: src/lib/transform/geometry/index.ts:99
Where the rotate handle is, in screen units: distance beyond the top-centre handle, away from the box's centre, so it
turns with the box. Returns the handle and the top-centre handle (anchor) it is joined to by a line.
Parameters
box
toScreen?
(p) => Point
converts canvas points to screen points
distance?
number = ROTATE_HANDLE_DISTANCE
Returns
object
anchor
anchor:
Point
handle
handle:
Point
Example
rotateHandle({ cx: 50, cy: 50, width: 40, height: 20, rotation: 0 }); // { anchor: { x: 50, y: 40 }, handle: { x: 50, y: 16 } }