ComputeBBox is called by default in render to compute bounding boxes for gui interaction -- can only be done in rendering because that is when all the proper transforms are all in place -- VpBBox is intersected with parent SVG
(sv *SVG)
| 417 | // gui interaction -- can only be done in rendering because that is when all |
| 418 | // the proper transforms are all in place -- VpBBox is intersected with parent SVG |
| 419 | func (g *NodeBase) BBoxes(sv *SVG) { |
| 420 | if g.This == nil { |
| 421 | return |
| 422 | } |
| 423 | ni := g.This.(Node) |
| 424 | g.BBox = ni.NodeBBox(sv) |
| 425 | g.BBox.Canon() |
| 426 | g.VisBBox = sv.Geom.SizeRect().Intersect(g.BBox) |
| 427 | } |
| 428 | |
| 429 | // PushTransform checks our bounding box and visibility, returning false if |
| 430 | // out of bounds. If visible, pushes our transform. |