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

Method Defaults

plot/legend.go:51–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51func (lg *Legend) Defaults() {
52 lg.TextStyle.Defaults()
53 lg.TextStyle.Padding.Dp(2)
54 lg.TextStyle.Font.Size.Dp(20)
55 lg.Position.Defaults()
56 lg.ThumbnailWidth.Pt(20)
57 lg.Fill = gradient.ApplyOpacity(colors.Scheme.Surface, 0.75)
58}
59
60// Add adds an entry to the legend with the given name.
61// The entry's thumbnail is drawn as the composite of all of the

Callers

nothing calls this directly

Calls 4

ApplyOpacityFunction · 0.92
DefaultsMethod · 0.65
DpMethod · 0.45
PtMethod · 0.45

Tested by

no test coverage detected