mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
restorable: Rename vertices -> quadVertices
This commit is contained in:
parent
600983e028
commit
97a54548df
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user