MCPcopy Create free account
hub / github.com/egonelbre/exp / Draw

Method Draw

zerostream/main.go:14–21  ·  view source on GitHub ↗
(out *op.Iterator)

Source from the content-addressed store, hash-verified

12type Rect struct{ X, Y, W, H int32 }
13
14func (r Rect) Draw(out *op.Iterator) {
15 out.Start()
16 *out.MoveTo() = op.MoveTo{r.X, r.Y}
17 *out.LineTo() = op.LineTo{r.X + r.W, r.Y}
18 *out.LineTo() = op.LineTo{r.X + r.W, r.Y + r.H}
19 *out.LineTo() = op.LineTo{r.X, r.Y + r.H}
20 out.Close()
21}
22
23func (r Rect) Render(out *op.Iterator) {
24 r.Draw(out)

Callers 4

RenderMethod · 0.95
convertToRGBAFunction · 0.45
mainFunction · 0.45
loadImageFunction · 0.45

Calls 4

MoveToMethod · 0.80
LineToMethod · 0.80
StartMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected