Protected_Font family
Font size in dp
ReadonlyidItalic
The displayed text
Text alignment
StaticPADDINGThe shape type identifier for JSON serialization
ProtectedapplyApply a resize operation given the new bounding box position and size.
The default implementation sets x, y, width, height directly.
Subclasses (e.g. PenShape) may override to use scaleX/scaleY instead.
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)
OptionaldisplayScale: numberHit-test a point (in canvas coordinates) against the shape
Optionalscale: numberNotifies all the registered listeners for the property change event.
OptionaloldValue: anyProtectedtoShape-specific extra JSON data
Staticrotate
Bold