shareable: Refactoring

This commit is contained in:
Hajime Hoshi 2018-06-11 01:02:25 +09:00
parent 3ee76ffd8e
commit a90b7efdf4

View File

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