internal/ui: rename ReplacePixels -> WritePixels

Updates #2236
This commit is contained in:
Hajime Hoshi 2022-08-08 03:31:36 +09:00
parent bd1b9cdb9b
commit 34aa52459e
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -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() {