Interface: DrawGesture
Experimental
A shape-drawing gesture (E5.5): with a draw dragmode (drawline, drawopenpath, drawclosedpath, drawcircle, drawrect), a drag that starts on a cartesian subplot's plot area — and that no view took through handlePointer — is offered to component views' ComponentView.drawShape, topmost first, once per animation frame while it moves, then once more when it ends. A press without a drag stays a click. The runtime only tracks the pointer; the view previews and commits the shape (the shapes component does, with newshape).
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
mode | readonly | | "drawclosedpath" | "drawopenpath" | "drawline" | "drawrect" | "drawcircle" | Experimental |
phase | readonly | "move" | "end" | "cancel" | Experimental move: preview; end: the pointer was released (commit); cancel: drop the preview. |
points | readonly | readonly number[] | Experimental Pointer positions in container px (top-left origin, like SubplotInfo.rect), clamped to the subplot's plot area, flat [x0, y0, x1, y1, …]: the start and the current position for drawline / drawcircle / drawrect, every sampled vertex for the freeform modes. |
subplot | readonly | SubplotInfo | Experimental The subplot the drag started on. |