Expand description
High-level plot composition layout.
Stacks on top of crate::layout to provide a patchwork-style model
where every plot is the same 13×16 anatomical grid (see anatomy::Slot)
and composed plots automatically align by anatomical position.
Construction is id-addressed: every Patch is created with a string id,
and resolved rects are looked up via
CompositionLayout::get(id, region) — flat
across any nesting depth.
Re-exports§
pub use anatomy::Slot;pub use anatomy::MARGIN_BOTTOM_ROW;pub use anatomy::MARGIN_LEFT_COL;pub use anatomy::MARGIN_RIGHT_COL;pub use anatomy::MARGIN_TOP_ROW;pub use anatomy::PADDING_BOTTOM_ROW;pub use anatomy::PADDING_LEFT_COL;pub use anatomy::PADDING_RIGHT_COL;pub use anatomy::PADDING_TOP_ROW;pub use anatomy::PANEL_COL;pub use anatomy::PANEL_ROW;pub use anatomy::PLOT_BOTTOM;pub use anatomy::PLOT_LEFT;pub use anatomy::PLOT_RIGHT;pub use anatomy::PLOT_TOP;pub use anatomy::TABLE_COLS;pub use anatomy::TABLE_ROWS;
Modules§
- anatomy
- Anatomical layout of a single patch — the 13×16 slot grid every patch shares.
Structs§
- Composition
- A grid of
Elements of sizerows × cols. Per-panel-column widths and per-panel-row heights default toFr(1.0); override withComposition::widths/Composition::heights. - Composition
Layout - Resolved layout for a
PatchorComposition. Query rects by patch id and anatomical region. - Patch
- A single plot’s content laid out into the 13×16 anatomical grid.
- Patch
Placement - One slot placement inside a
Patch— captures the anatomical position, the region name (used for lookups in the resolved layout), and theCellwhose measure drives sizing. - Span
- A row × column span (1-indexed counts) used by
Patch::place_atandComposition::place.
Enums§
- Composition
Error - Errors produced by
Composition::try_solve. - Element
- Either a
Patchor a (nested)Composition.
Traits§
- Region
- Anything that names a region for
CompositionLayout::getlookups.
Functions§
- beside
- Place
aandbside by side in a 1×2 composition. - grid
- Build a
rows × colscomposition fromcellsin row-major order.cells.len()must equalrows * cols. - spacer
- An anonymous spacer patch — empty, alignment-only, not addressable.
- stack
- Stack
aon top ofbin a 2×1 composition. - wrap
- A patch wrapping
cellin its Panel slot. Addressable as(id, "panel").