blob: 2859433912e7e43e84e10a1475bb4846cc470404 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# Paint
```
$ go run main.go
```
This is a simple paint program. Pick colors on the right, draw on the rest.

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.
|