restorable: Rename vertices -> quadVertices

This commit is contained in:
Hajime Hoshi 2018-06-10 20:41:17 +09:00
parent 600983e028
commit 97a54548df
2 changed files with 3 additions and 3 deletions

View File

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

View File

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