MCPcopy Create free account
hub / github.com/cogentcore/core / LocalBBoxToWin

Method LocalBBoxToWin

svg/node.go:389–392  ·  view source on GitHub ↗

LocalBBoxToWin converts a local bounding box to SVG coordinates

(bb math32.Box2)

Source from the content-addressed store, hash-verified

387
388// LocalBBoxToWin converts a local bounding box to SVG coordinates
389func (g *NodeBase) LocalBBoxToWin(bb math32.Box2) image.Rectangle {
390 mxi := g.ParTransform(true) // include self
391 return bb.MulMatrix2(mxi).ToRect()
392}
393
394func (g *NodeBase) NodeBBox(sv *SVG) image.Rectangle {
395 rs := &sv.RenderState

Callers 1

PushTransformMethod · 0.95

Calls 3

ParTransformMethod · 0.95
ToRectMethod · 0.80
MulMatrix2Method · 0.80

Tested by

no test coverage detected