move sprite to window center

This commit is contained in:
mollusk 2018-01-16 01:17:04 -07:00
parent 79f179df3d
commit 87bd244e62

View File

@ -46,7 +46,7 @@ func run() {
sprite := pixel.NewSprite(pic, pic.Bounds())
win.Clear(colornames.Skyblue)
sprite.Draw(win, pixel.IM)
sprite.Draw(win, pixel.IM.Moved(win.Bounds().Center()))
for !win.Closed() {
win.Update()