Skip to main content

fit_scene

Function fit_scene 

Source
pub fn fit_scene(scene: Scene, margin: f64) -> Scene
Expand description

Recompute the SVG viewBox from painted ink after layout.

AABB over viewport layers (document space), overlays, and halo. The camera is viewBox = (min - margin) + content size + 2·margin. Geometry is not translated; path d is not rewritten.