Protected_Protected_Arrowhead size in dp
Whether to draw arrowhead at start
ReadonlyidStart point
End point
Protected Static ReadonlyBOUNDS_ProtectedboundsThe shape type identifier for JSON serialization
Raw bounding box of the stored points (no translation / scaling applied).
Protected_ProtectedapplyFor PenShape, "resize" means adjusting scaleX/scaleY (plus x/y offset) so that the rendered bounds match the requested rectangle. The input coordinates come from getBounds() which includes strokeWidth/2 padding, so we strip that padding before computing scale to avoid a "jump" on first move.
Draw selection overlay: bounding box + handles, rotated with the shape.
the canvas to draw on (already inside the shape's canvas transform)
OptionalhandleSize: numberhandle square size in dp at 1× zoom
OptionaldisplayScale: numberthe effective display scale (canvasScale × matrix scale). Sizes are divided by this value so that handles appear constant-size on screen regardless of zoom.
ProtectedfromRestore shape-specific data from JSON
Return the untransformed bounding box (in local coordinates offset by x,y)
Get the 8 resize handles + 1 rotation handle in canvas (world) coordinates, accounting for rotation
Get bounding box in canvas space (accounting for position, scale and rotation is simplified as AABB)
Hit-test a point (in canvas coordinates) against the shape
OptionaloldValue: anyProtectedtoShape-specific extra JSON data
Staticrotate
Whether to draw arrowhead at end