Expand description
day-geometry — plain Copy value types shared by layout, canvas, and the toolkit spec.
Everything is in points (density-independent); backends convert to device pixels (§7.9).
Structs§
- Affine
- A 2-D affine transform (CoreGraphics row-vector convention): a point
pmaps to(a·p.x + c·p.y + tx, b·p.x + d·p.y + ty). Used by canvas transform ops for shape rotate/scale/offset — every native 2-D context concatenates it onto its CTM identically. - Color
- sRGB color, 0.0–1.0 components. Semantic theme tokens (§6.3) resolve to these in the backend.
- Insets
- Logical insets:
leading/trailingresolve against the layout direction at place time (§7.8). - Point
- Proposal
- The layout proposal:
None= unconstrained on that axis (§7.2). - Rect
- Size
- Transform
- A cheap per-node visual transform (§8.4 animation): translation, uniform/non-uniform scale, and
rotation about a unit anchor (
0.0..1.0within the node’s bounds; default center). Distinct from the layout frame — animating aTransformnever triggers relayout, so it is the vehicle for movement/scaling animation. Each backend composes it onto the node’s laid-out frame via its native transform channel (CALayer/GskTransform/RenderTransform/NODE_TRANSFORM/…).
Enums§
Traits§
- Animatable
- Linear interpolation of animatable values (
tin0.0..1.0). This drives the canvas / self-driven animation path (docs/shapes.md §5) and Qt’s sampled spring; native-widget animation does NOT use it — the toolkit interpolates on its own compositor.