mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-29 04:27:30 -06:00
crates/engine/src/print/layout.rs is the pure page model the Print module builds on: ten named papers plus custom, orientation, margins and the printable area; Single Image, Contact Sheet (grid with spacing and square cells), Picture Package and Custom Package styles; package cells with a stacking order (send to back / backward / forward / bring to front); a deterministic MaxRects packer behind Auto Layout (largest first, earlier pages filled before a new one opens, a cell turned a quarter only when it fits nowhere as given); snap-to-cells and snap-to-grid helpers; ruler units and guide options. All lengths are inches in page space, after orientation. Every number from outside is checked (NaN, infinity, negative, oversized, cell and page caps) and Layout::validate guards saved layouts. No command or UI reaches it yet, so the parity rows keep their status.
5 lines
190 B
Rust
5 lines
190 B
Rust
//! The Print module: page layout, composition of pages and PDF output.
|
|
//!
|
|
//! [`layout`] is the pure page model (paper, margins, cells); the rest of the module renders it.
|
|
pub mod layout;
|