def scene.bounds

gralha-svg-render@0.1.0.1 · svg.bend:2583

import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base

2583# A child's box already holds its own children, so the parent's box is the
2584# union of the children's boxes brought into its space.
2585def scene.bounds(xs: List<&2, Scene<Brush>>, +parentInverse: Matrix, box: Bounds) -> Bounds:
2586  match xs:
2587    case Nil{}: box
2588    case Con{Scene{es, childbox, inv, style, opacity, kids, id, ink, mask, outline, fillTree, maskNodes, maskMode, markerNodes, coverage, effect}, rest}:
2589      scene.bounds(rest, parentInverse, bounds.merge(box, bounds.transform(childbox, matrix.mul(parentInverse, matrix.inverse(inv)))))

Uses (9)

Used by (1)