mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 12:08:58 +01:00
ebiten: Rename a variable
This commit is contained in:
parent
96fa0565e4
commit
e180598ce0
8
image.go
8
image.go
@ -552,23 +552,23 @@ func (i *Image) Dispose() error {
|
|||||||
// ReplacePixels replaces the pixels of the image with p.
|
// ReplacePixels replaces the pixels of the image with p.
|
||||||
//
|
//
|
||||||
// The given p must represent RGBA pre-multiplied alpha values.
|
// The given p must represent RGBA pre-multiplied alpha values.
|
||||||
// len(p) must equal to 4 * (bounds width) * (bounds height).
|
// len(pix) must equal to 4 * (bounds width) * (bounds height).
|
||||||
//
|
//
|
||||||
// ReplacePixels works on a sub-image.
|
// ReplacePixels works on a sub-image.
|
||||||
//
|
//
|
||||||
// When len(p) is not appropriate, ReplacePixels panics.
|
// When len(pix) is not appropriate, ReplacePixels panics.
|
||||||
//
|
//
|
||||||
// When the image is disposed, ReplacePixels does nothing.
|
// When the image is disposed, ReplacePixels does nothing.
|
||||||
//
|
//
|
||||||
// ReplacePixels always returns nil as of 1.5.0-alpha.
|
// ReplacePixels always returns nil as of 1.5.0-alpha.
|
||||||
func (i *Image) ReplacePixels(p []byte) error {
|
func (i *Image) ReplacePixels(pix []byte) error {
|
||||||
i.copyCheck()
|
i.copyCheck()
|
||||||
|
|
||||||
if i.isDisposed() {
|
if i.isDisposed() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
r := i.Bounds()
|
r := i.Bounds()
|
||||||
if err := i.buffered.ReplacePixels(p, r.Min.X, r.Min.Y, r.Dx(), r.Dy()); err != nil {
|
if err := i.buffered.ReplacePixels(pix, r.Min.X, r.Min.Y, r.Dx(), r.Dy()); err != nil {
|
||||||
theUIContext.setError(err)
|
theUIContext.setError(err)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user