mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
restorable: Refactoring: Remove (*Image).internalSize()
This commit is contained in:
parent
52b52e7d92
commit
93dc9ad589
@ -300,11 +300,6 @@ func (i *Image) Size() (int, int) {
|
|||||||
return i.width, i.height
|
return i.width, i.height
|
||||||
}
|
}
|
||||||
|
|
||||||
// internalSize returns the size of the internal texture.
|
|
||||||
func (i *Image) internalSize() (int, int) {
|
|
||||||
return i.image.InternalSize()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (i *Image) PutVertex(vs []float32, dx, dy, sx, sy float32, bx0, by0, bx1, by1 float32, cr, cg, cb, ca float32) {
|
func (i *Image) PutVertex(vs []float32, dx, dy, sx, sy float32, bx0, by0, bx1, by1 float32, cr, cg, cb, ca float32) {
|
||||||
// Specifying a range explicitly here is redundant but this helps optimization
|
// Specifying a range explicitly here is redundant but this helps optimization
|
||||||
// to eliminate boundary checks.
|
// to eliminate boundary checks.
|
||||||
@ -313,7 +308,7 @@ func (i *Image) PutVertex(vs []float32, dx, dy, sx, sy float32, bx0, by0, bx1, b
|
|||||||
// might not work.
|
// might not work.
|
||||||
vs = vs[0:12]
|
vs = vs[0:12]
|
||||||
|
|
||||||
w, h := i.internalSize()
|
w, h := i.image.InternalSize()
|
||||||
vs[0] = dx
|
vs[0] = dx
|
||||||
vs[1] = dy
|
vs[1] = dy
|
||||||
vs[2] = sx / float32(w)
|
vs[2] = sx / float32(w)
|
||||||
|
Loading…
Reference in New Issue
Block a user