Skip to main content

Module page

Module page 

Expand description

A centered document “page” — a sheet of paper with a soft drop shadow, the familiar surface for document apps (word processor, viewers). Layout is split from drawing because the page’s height usually depends on content laid out against PageGeometry::content_width first.

Structs§

PageGeometry
Where a centered page sits within a canvas, plus its inner content band.

Functions§

draw
Draw a rounded paper sheet lifted off the desk by elevation.
geometry
Lay out a centered page within canvas: max_width caps the page width, top_gap is the margin above it (and the side gap when the canvas is wide), and content_margin is the inner text margin on each side.