ShapeType

sealed class ShapeType

Defines how Element.Shape is rendered on the canvas.

Each shape type has specific rendering rules and geometry calculations:

  • RECTANGLE: Axis-aligned rectangle using top-left and dimensions

  • CIRCLE: Circle with center calculated from start/end points

  • TRIANGLE: Isosceles triangle pointing upward

  • ARROW: Arrow with line and scaled arrowhead

  • LINE: Straight line between two points

See also

rendering functions (drawRect, drawCircle, drawTriangle, etc)

Inheritors

Types

Link copied to clipboard
data object ARROW : ShapeType

Arrow shape with intelligent head sizing

Link copied to clipboard
data object CIRCLE : ShapeType

Circular shape

Link copied to clipboard
data object LINE : ShapeType

Straight line shape

Link copied to clipboard
data object RECTANGLE : ShapeType

Axis-aligned rectangle shape

Link copied to clipboard
data object TRIANGLE : ShapeType

Triangle shape

Functions

Link copied to clipboard

Shape types whose visual outline can be rounded at the corners.

Link copied to clipboard