mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +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() {
|
func init() {
|
||||||
emptyImage, _ = NewImage(1, 1, FilterDefault)
|
emptyImage, _ = NewImage(1, 1, FilterDefault)
|
||||||
|
// (*Image).Fill uses emptyImage, then Fill cannot be called here.
|
||||||
emptyImage.ReplacePixels([]byte{0xff, 0xff, 0xff, 0xff})
|
emptyImage.ReplacePixels([]byte{0xff, 0xff, 0xff, 0xff})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,12 +29,7 @@ var emptyImage *ebiten.Image
|
|||||||
func init() {
|
func init() {
|
||||||
const w, h = 16, 16
|
const w, h = 16, 16
|
||||||
emptyImage, _ = ebiten.NewImage(w, h, ebiten.FilterDefault)
|
emptyImage, _ = ebiten.NewImage(w, h, ebiten.FilterDefault)
|
||||||
pix := make([]byte, 4*w*h)
|
emptyImage.Fill(color.White)
|
||||||
for i := range pix {
|
|
||||||
pix[i] = 0xff
|
|
||||||
}
|
|
||||||
// (*Image).Fill uses emptyImage, then Fill cannot be called here.
|
|
||||||
emptyImage.ReplacePixels(pix)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Path represents a collection of paths.
|
// Path represents a collection of paths.
|
||||||
|
Loading…
Reference in New Issue
Block a user