diff --git a/graphicscontext.go b/graphicscontext.go index b326c1afa..758480587 100644 --- a/graphicscontext.go +++ b/graphicscontext.go @@ -64,8 +64,8 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo } c.offscreen = newVolatileImage(screenWidth, screenHeight) - w := int(float64(screenWidth) * screenScale) - h := int(float64(screenHeight) * screenScale) + w := int(math.Ceil(float64(screenWidth) * screenScale)) + h := int(math.Ceil(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