mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
shareable: Add comments
This commit is contained in:
parent
339155f63d
commit
6f428c584d
@ -296,9 +296,10 @@ func (i *Image) Fill(r, g, b, a uint8) {
|
||||
rf, gf, bf, af)
|
||||
is := graphics.QuadIndices()
|
||||
|
||||
c := graphics.CompositeModeSourceOver
|
||||
if a < 0xff {
|
||||
c = graphics.CompositeModeCopy
|
||||
c := graphics.CompositeModeCopy
|
||||
if a == 0xff {
|
||||
// If the color is opaque, SourceOver is available and this is preferable for optimization.
|
||||
c = graphics.CompositeModeSourceOver
|
||||
}
|
||||
i.DrawImage(emptyImage, vs, is, nil, c, graphics.FilterNearest, graphics.AddressClampToZero)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user