Skip to main content

Crate stipple_layout

Crate stipple_layout 

Source
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 <= max component-wise.
FlexItem
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 available main-axis space, separated by gap. Free space (after bases and gaps) is distributed to items in proportion to their grow weight; if no item grows, leftover space is left unused (items pack at the start).