mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 13:07:26 +01:00
shareable: Refactoring
This commit is contained in:
parent
3ee76ffd8e
commit
a90b7efdf4
@ -158,12 +158,8 @@ func (i *Image) DrawImage(img *Image, sx0, sy0, sx1, sy1 int, geom *affine.GeoM,
|
||||
}
|
||||
|
||||
dx, dy, _, _ := img.region()
|
||||
sx0 += dx
|
||||
sy0 += dy
|
||||
sx1 += dx
|
||||
sy1 += dy
|
||||
w, h := img.backend.restorable.Size()
|
||||
vs := graphicsutil.QuadVertices(w, h, sx0, sy0, sx1, sy1, geom)
|
||||
vs := graphicsutil.QuadVertices(w, h, sx0+dx, sy0+dy, sx1+dx, sy1+dy, geom)
|
||||
i.backend.restorable.DrawImage(img.backend.restorable, vs, quadIndices, colorm, mode, filter)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user