examples/paint: Refactoring

This commit is contained in:
Hajime Hoshi 2017-05-31 00:58:17 +09:00
parent cbc08d9c16
commit 62b364de2d

View File

@ -42,7 +42,7 @@ func paint(screen *ebiten.Image, x, y int) {
op := &ebiten.DrawImageOptions{}
op.GeoM.Translate(float64(x), float64(y))
op.ColorM.Scale(1.0, 0.50, 0.125, 1.0)
theta := 2.0 * math.Pi * float64(count%60) / ebiten.FPS
theta := 2.0 * math.Pi * float64(count%ebiten.FPS) / ebiten.FPS
op.ColorM.RotateHue(theta)
canvasImage.DrawImage(brushImage, op)
}