graphics: Fix wrong comments

This commit is contained in:
Hajime Hoshi 2019-07-31 01:58:54 +09:00
parent fc42af208d
commit 215e9e5c66
2 changed files with 2 additions and 6 deletions

View File

@ -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})
}

View File

@ -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.