reanimate-0.4.1.0: Animation library based on SVGs.

Safe HaskellNone
LanguageHaskell2010

Reanimate.Svg.BoundingBox

Synopsis

Documentation

boundingBox :: Tree -> (Double, Double, Double, Double) Source #

Return bounding box of SVG tree. The four numbers returned are (minimal X-coordinate, minimal Y-coordinate, width, height)

Note: Bounding boxes are computed on a best-effort basis and will not work in all cases. The only supported SVG nodes are: path, circle, polyline, ellipse, line, rectangle, image. All other nodes return (0,0,0,0).