mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 11:12:44 +01:00
graphics: Fix wrong comments
This commit is contained in:
parent
fc42af208d
commit
215e9e5c66
1
image.go
1
image.go
@ -82,6 +82,7 @@ var emptyImage *Image
|
||||
|
||||
func init() {
|
||||
emptyImage, _ = NewImage(1, 1, FilterDefault)
|
||||
// (*Image).Fill uses emptyImage, then Fill cannot be called here.
|
||||
emptyImage.ReplacePixels([]byte{0xff, 0xff, 0xff, 0xff})
|
||||
}
|
||||
|
||||
|
@ -29,12 +29,7 @@ var emptyImage *ebiten.Image
|
||||
func init() {
|
||||
const w, h = 16, 16
|
||||
emptyImage, _ = ebiten.NewImage(w, h, ebiten.FilterDefault)
|
||||
pix := make([]byte, 4*w*h)
|
||||
for i := range pix {
|
||||
pix[i] = 0xff
|
||||
}
|
||||
// (*Image).Fill uses emptyImage, then Fill cannot be called here.
|
||||
emptyImage.ReplacePixels(pix)
|
||||
emptyImage.Fill(color.White)
|
||||
}
|
||||
|
||||
// Path represents a collection of paths.
|
||||
|
Loading…
Reference in New Issue
Block a user