mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
graphics: Refactoring
This commit is contained in:
parent
dcb05fb9ad
commit
f1d97a7758
@ -54,15 +54,13 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo
|
||||
if c.offscreen != nil {
|
||||
_ = c.offscreen.Dispose()
|
||||
}
|
||||
offscreen := newVolatileImage(screenWidth, screenHeight, FilterDefault)
|
||||
c.offscreen = newVolatileImage(screenWidth, screenHeight, FilterDefault)
|
||||
|
||||
w := int(float64(screenWidth) * screenScale)
|
||||
h := int(float64(screenHeight) * screenScale)
|
||||
px0, py0, _, _ := ui.ScreenPadding()
|
||||
c.screen = newImageWithScreenFramebuffer(w, h)
|
||||
|
||||
c.offscreen = offscreen
|
||||
|
||||
c.offsetX = px0
|
||||
c.offsetY = py0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user