Expand description
Stipple’s layout primitives.
A self-contained flex/box model (no taffy): Constraints describe the
size range a parent offers a child, Axis picks main vs. cross, and
solve_main_axis distributes space along the main axis among fixed-size
and flexible children. stipple-core composes these into a full tree layout
pass; the algorithms here are deliberately small and independently testable.
Structs§
- Constraints
- The size range a parent offers a child: every laid-out size must satisfy
min <= size <= maxcomponent-wise. - Flex
Item - One participant in a main-axis flex layout.
- Span
- The resolved position of one item along the main axis.
Enums§
- Axis
- A layout axis.
Functions§
- solve_
main_ axis - Lay items out along a single axis within
availablemain-axis space, separated bygap. Free space (after bases and gaps) is distributed to items in proportion to theirgrowweight; if no item grows, leftover space is left unused (items pack at the start).