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

Method LocalBBox

svg/rect.go:43–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43func (g *Rect) LocalBBox() math32.Box2 {
44 bb := math32.Box2{}
45 hlw := 0.5 * g.LocalLineWidth()
46 bb.Min = g.Pos.SubScalar(hlw)
47 bb.Max = g.Pos.Add(g.Size).AddScalar(hlw)
48 return bb
49}
50
51func (g *Rect) Render(sv *SVG) {
52 vis, pc := g.PushTransform(sv)

Callers

nothing calls this directly

Calls 4

LocalLineWidthMethod · 0.80
AddMethod · 0.65
SubScalarMethod · 0.45
AddScalarMethod · 0.45

Tested by

no test coverage detected