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

Method Thumbnail

plot/plots/barchart.go:233–240  ·  view source on GitHub ↗

Thumbnail fulfills the plot.Thumbnailer interface.

(plt *plot.Plot)

Source from the content-addressed store, hash-verified

231
232// Thumbnail fulfills the plot.Thumbnailer interface.
233func (b *BarChart) Thumbnail(plt *plot.Plot) {
234 pc := plt.Paint
235 pc.FillStyle.Color = b.Color
236 b.LineStyle.SetStroke(plt)
237 ptb := pc.Bounds
238 pc.DrawRectangle(float32(ptb.Min.X), float32(ptb.Min.Y), float32(ptb.Size().X), float32(ptb.Size().Y))
239 pc.FillStrokeClear()
240}

Callers

nothing calls this directly

Calls 4

DrawRectangleMethod · 0.80
FillStrokeClearMethod · 0.80
SizeMethod · 0.65
SetStrokeMethod · 0.45

Tested by

no test coverage detected