Skip to main content

Module paper

Module paper 

Source
Expand description

Page Layout view geometry: a sheet shown as printed pages side by side.

The view uses the print pagination ([crate::engine::cmd::print::split_bands]) over the sheet from A1, so its page edges are the printed ones whenever the print area starts at A1. Pages keep going right and down past the data (“Click to add data” pages), as far as the view needs.

Coordinates are layout units: sheet pixels (96 dpi) at the print scale, so a cell keeps its sheet size and a page is paper / scale big. The UI multiplies by its zoom. Pages sit in a grid with a gap around each: page (row band, column band) starts at (gap + j·(page_w + gap), gap + i·(page_h + gap)), and its cells start at its top-left margin.

Structs§

HfZone
A header or footer zone of one page.
PageGrid
One sheet paginated for the Page Layout view.

Constants§

PAGE_GAP
Gap between pages on screen, in pixels at 100% zoom.

Functions§

need_for
Sheet-wide helper: the bottom-right cell a page grid for this sheet must reach so that the layout rectangle up to (x, y) is covered. Layout coordinates never run ahead of sheet coordinates (pages only add margins and gaps), so the sheet position is a safe bound.