Expand description
How big the diagram is — measured from what a render actually painted.
Two answers are derived from a render rather than from the document: the
SVG export’s viewBox and the editor’s fit-to-content framing. Both read
the extent through Bounds, so neither can disagree with the other about
what a primitive occupies, and a shape kind added later joins both the
moment it is drawn.
Extent is the standalone half: a Renderer that draws nothing and
remembers only where. It measures text and images through the backend that
would have drawn them, so a fit frames exactly what the canvas paints.
Structs§
- Bounds
- The running world-space union of everything a render has drawn.
- Extent
- A
Rendererthat draws nothing and only measures: hand it the same draw passes the canvas runs andExtent::finishis the world-space rect they covered. Text and image sizes come frominner, the backend that would have drawn them.