Skip to main content

Module drawing

Module drawing 

Expand description

Drawing — shapes drawn with the design system (docs/designs/app-language/components.md §4.1, the custom-widget ladder’s second step).

A drawing is a list of Shape values over its own box: coordinates are fractions of the box, colours are theme roles (Ink), stroke widths are tokens (Weight). It lowers to the same kurbo paths, fills and strokes super::Sparkline paints with, resolved against the theme each frame, so every theme reaches it. It carries a semantic role so assistive technology and agents read what it means rather than its shapes, and a press reports the topmost shape under the pointer as data.

Structs§

Drawing
Shapes drawn with the design system over a box of their own.
DrawingProps
Shapes drawn with the design system over a box of their own: a ring, a gauge, a small chart, a diagram. Colours are theme roles and widths tokens; a press reports which shape.

Enums§

Ink
A colour of the design system a shape is painted in: a role of the person’s theme, never a colour of the app’s own.
Meaning
What a drawing means, for assistive technology and agents: required, so a drawing is never only pixels.
Shape
One shape of a Drawing. Coordinates and sizes are fractions of the drawing’s box (0.5 is its middle); angles of an arc are fractions of a turn, from the top, clockwise.
Weight
How heavy a stroke is: a token of the design system, never pixels.

Functions§

shape_description
The description of Shape, as the catalogue lists it in its enums.