From a82201cfe8b8fe61ff21a24e0ac029588b76653c Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 12 Aug 2018 19:26:38 +0900 Subject: [PATCH] graphics: Use an even number for screen height offset Fixes #622 --- graphicscontext.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/graphicscontext.go b/graphicscontext.go index 64622c284..7022a67ef 100644 --- a/graphicscontext.go +++ b/graphicscontext.go @@ -122,7 +122,8 @@ func (c *graphicsContext) Update(afterFrameUpdate func()) error { // c.screen is special: its Y axis is down to up, // and the origin point is lower left. op.GeoM.Scale(c.screenScale, -c.screenScale) - op.GeoM.Translate(0, float64(dh)) + // Make dh an even number to fit the upper side of the screen (#662). + op.GeoM.Translate(0, float64((dh+1)/2*2)) op.GeoM.Translate(c.offsetX, c.offsetY) op.CompositeMode = CompositeModeCopy