aboutsummaryrefslogtreecommitdiffstats
path: root/examples/paint/README.md
blob: c02047da736895181c71f932dca8c5081249eeee (plain) (blame)
1
2
3
4
5
6
7
8
9
# Paint

This is a simple paint program. Pick colors on the right, draw on the rest.

![Screenshot](screenshot.png)

The canvas in the middle is controlled by a goroutine. Each of the 8 color pickers is also controlled by its own goroutine. When clicked, the color picker sends its color to the canvas over a channel. The canvas listens on the channel and changes its color.

Uses [`fogleman/gg`](https://github.com/fogleman/gg) for drawing lines.