MCPcopy Create free account
hub / github.com/fogleman/primitive / Draw

Method Draw

primitive/rectangle.go:37–41  ·  view source on GitHub ↗
(dc *gg.Context, scale float64)

Source from the content-addressed store, hash-verified

35}
36
37func (r *Rectangle) Draw(dc *gg.Context, scale float64) {
38 x1, y1, x2, y2 := r.bounds()
39 dc.DrawRectangle(float64(x1), float64(y1), float64(x2-x1+1), float64(y2-y1+1))
40 dc.Fill()
41}
42
43func (r *Rectangle) SVG(attrs string) string {
44 x1, y1, x2, y2 := r.bounds()

Callers

nothing calls this directly

Calls 1

boundsMethod · 0.95

Tested by

no test coverage detected