diff --git a/internal/restorable/image.go b/internal/restorable/image.go index 8b6788fb8..1059a5270 100644 --- a/internal/restorable/image.go +++ b/internal/restorable/image.go @@ -148,7 +148,7 @@ func (i *Image) ReplacePixels(pixels []byte, x, y, width, height int) { geom := (*affine.GeoM)(nil).Scale(float64(width)/float64(w), float64(height)/float64(h)) geom = geom.Translate(float64(x), float64(y)) colorm := (*affine.ColorM)(nil).Scale(0, 0, 0, 0) - vs := vertices(w, h, 0, 0, w, h, geom) + vs := quadVertices(w, h, 0, 0, w, h, geom) i.image.DrawImage(dummyImage.image, vs, quadIndices, colorm, opengl.CompositeModeCopy, graphics.FilterNearest) } @@ -188,7 +188,7 @@ func (i *Image) ReplacePixels(pixels []byte, x, y, width, height int) { // DrawImage draws a given image img to the image. func (i *Image) DrawImage(img *Image, sx0, sy0, sx1, sy1 int, geom *affine.GeoM, colorm *affine.ColorM, mode opengl.CompositeMode, filter graphics.Filter) { w, h := img.Size() - vs := vertices(w, h, sx0, sy0, sx1, sy1, geom) + vs := quadVertices(w, h, sx0, sy0, sx1, sy1, geom) if vs == nil { return } diff --git a/internal/restorable/vertices.go b/internal/restorable/vertices.go index 136240c58..d8870cc4e 100644 --- a/internal/restorable/vertices.go +++ b/internal/restorable/vertices.go @@ -44,7 +44,7 @@ func (v *verticesBackend) sliceForOneQuad() []float32 { return s } -func vertices(width, height int, sx0, sy0, sx1, sy1 int, geo *affine.GeoM) []float32 { +func quadVertices(width, height int, sx0, sy0, sx1, sy1 int, geo *affine.GeoM) []float32 { if sx0 >= sx1 || sy0 >= sy1 { return nil }