mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-23 09:22:01 +01:00
parent
bd1b9cdb9b
commit
34aa52459e
2
image.go
2
image.go
@ -941,7 +941,7 @@ func (i *Image) ReplacePixels(pixels []byte) {
|
||||
// Do not need to copy pixels here.
|
||||
// * In internal/mipmap, pixels are copied when necessary.
|
||||
// * In internal/atlas, pixels are copied to make its paddings.
|
||||
i.image.ReplacePixels(pixels, x, y, r.Dx(), r.Dy())
|
||||
i.image.WritePixels(pixels, x, y, r.Dx(), r.Dy())
|
||||
}
|
||||
|
||||
// NewImage returns an empty image.
|
||||
|
@ -71,7 +71,7 @@ func (i *Image) DrawTriangles(srcs [graphics.ShaderImageCount]*Image, vertices [
|
||||
i.mipmap.DrawTriangles(srcMipmaps, vertices, indices, colorm, mode, filter, address, dstRegion, srcRegion, subimageOffsets, s, uniforms, evenOdd, canSkipMipmap)
|
||||
}
|
||||
|
||||
func (i *Image) ReplacePixels(pix []byte, x, y, width, height int) {
|
||||
func (i *Image) WritePixels(pix []byte, x, y, width, height int) {
|
||||
i.mipmap.WritePixels(pix, x, y, width, height)
|
||||
}
|
||||
|
||||
@ -106,8 +106,8 @@ func init() {
|
||||
for i := range pix {
|
||||
pix[i] = 0xff
|
||||
}
|
||||
// As emptyImage is used at Fill, use ReplacePixels instead.
|
||||
emptyImage.ReplacePixels(pix, 0, 0, emptyImage.width, emptyImage.height)
|
||||
// As emptyImage is used at Fill, use WritePixels instead.
|
||||
emptyImage.WritePixels(pix, 0, 0, emptyImage.width, emptyImage.height)
|
||||
}
|
||||
|
||||
func (i *Image) clear() {
|
||||
|
Loading…
Reference in New Issue
Block a user