MCPcopy
hub / github.com/fogleman/primitive / newContext

Method newContext

primitive/model.go:57–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57func (model *Model) newContext() *gg.Context {
58 dc := gg.NewContext(model.Sw, model.Sh)
59 dc.Scale(model.Scale, model.Scale)
60 dc.Translate(0.5, 0.5)
61 dc.SetColor(model.Background.NRGBA())
62 dc.Clear()
63 return dc
64}
65
66func (model *Model) Frames(scoreDelta float64) []image.Image {
67 var result []image.Image

Callers 2

NewModelFunction · 0.95
FramesMethod · 0.95

Calls 2

NRGBAMethod · 0.80
ClearMethod · 0.80

Tested by

no test coverage detected