diff --git a/graphicscontext.go b/graphicscontext.go index 05b5149a2..db3368d8c 100644 --- a/graphicscontext.go +++ b/graphicscontext.go @@ -65,8 +65,8 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo } c.offscreen = newVolatileImage(screenWidth, screenHeight) - w := int(math.Ceil(float64(screenWidth) * screenScale)) - h := int(math.Ceil(float64(screenHeight) * screenScale)) + w := int(float64(screenWidth) * screenScale) + h := int(float64(screenHeight) * screenScale) px0, py0, px1, py1 := ui.ScreenPadding() c.screen = newImageWithScreenFramebuffer(w+int(math.Ceil(px0+px1)), h+int(math.Ceil(py0+py1))) c.screenWidth = w