minor change in xor example code

This commit is contained in:
faiface 2017-04-15 17:16:57 +02:00
parent 49c2beeca9
commit 05da8e6f92
1 changed files with 4 additions and 4 deletions

View File

@ -40,28 +40,28 @@ func run() {
// red circle
imd.Clear()
imd.Color(pixel.RGB(1, 0, 0))
imd.Push(pixel.X(-offset) + win.Bounds().Center())
imd.Push(win.Bounds().Center() - pixel.X(offset))
imd.Circle(200, 0)
imd.Draw(canvas)
// blue circle
imd.Clear()
imd.Color(pixel.RGB(0, 0, 1))
imd.Push(pixel.X(offset) + win.Bounds().Center())
imd.Push(win.Bounds().Center() + pixel.X(offset))
imd.Circle(150, 0)
imd.Draw(canvas)
// yellow circle
imd.Clear()
imd.Color(pixel.RGB(1, 1, 0))
imd.Push(pixel.Y(-offset) + win.Bounds().Center())
imd.Push(win.Bounds().Center() - pixel.Y(offset))
imd.Circle(100, 0)
imd.Draw(canvas)
// magenta circle
imd.Clear()
imd.Color(pixel.RGB(1, 0, 1))
imd.Push(pixel.Y(offset) + win.Bounds().Center())
imd.Push(win.Bounds().Center() + pixel.Y(offset))
imd.Circle(50, 0)
imd.Draw(canvas)