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

Method LocalBBox

svg/polyline.go:30–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30func (g *Polyline) LocalBBox() math32.Box2 {
31 bb := math32.B2Empty()
32 for _, pt := range g.Points {
33 bb.ExpandByPoint(pt)
34 }
35 hlw := 0.5 * g.LocalLineWidth()
36 bb.Min.SetSubScalar(hlw)
37 bb.Max.SetAddScalar(hlw)
38 return bb
39}
40
41func (g *Polyline) Render(sv *SVG) {
42 sz := len(g.Points)

Callers

nothing calls this directly

Calls 5

B2EmptyFunction · 0.92
LocalLineWidthMethod · 0.80
ExpandByPointMethod · 0.45
SetSubScalarMethod · 0.45
SetAddScalarMethod · 0.45

Tested by

no test coverage detected