Skip to content

Commit

Permalink
document that you can combine any number of canvas rendering operations
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Dec 25, 2024
1 parent 69e96e6 commit adc995d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/content/canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,21 @@ core.NewCanvas(b).SetDraw(func(pc *paint.Context) {
})
```

You can combine any number of canvas rendering operations:

```Go
core.NewCanvas(b).SetDraw(func(pc *paint.Context) {
pc.DrawCircle(0.5, 0.5, 0.5)
pc.FillStyle.Color = colors.Scheme.Success.Container
pc.Fill()

pc.MoveTo(0, 0)
pc.LineTo(1, 1)
pc.StrokeStyle.Color = colors.Scheme.Error.Base
pc.Stroke()
})
```

You can draw ellipses:

```Go
Expand Down

0 comments on commit adc995d

Please sign in to comment.