ebiten: move comments

This commit is contained in:
Hajime Hoshi 2022-02-23 02:54:14 +09:00
parent 352fd76312
commit cc1fd437a1

View File

@ -106,14 +106,14 @@ func (c *gameForUI) Draw(screenScale float64, offsetX, offsetY float64, needsCle
op.GeoM.Translate(offsetX, offsetY) op.GeoM.Translate(offsetX, offsetY)
op.CompositeMode = CompositeModeCopy op.CompositeMode = CompositeModeCopy
// filterScreen works with >=1 scale, but does not well with <1 scale.
// Use regular FilterLinear instead so far (#669).
switch { switch {
case math.Floor(s) == s: case math.Floor(s) == s:
op.Filter = FilterNearest op.Filter = FilterNearest
case s > 1: case s > 1:
op.Filter = filterScreen op.Filter = filterScreen
default: default:
// filterScreen works with >=1 scale, but does not well with <1 scale.
// Use regular FilterLinear instead so far (#669).
op.Filter = FilterLinear op.Filter = FilterLinear
} }
c.screen.DrawImage(c.offscreen, op) c.screen.DrawImage(c.offscreen, op)