internal/atlas: refactoring: remove unnecessary calculations

This commit is contained in:
Hajime Hoshi 2023-04-28 00:26:09 +09:00
parent 9e61b52a70
commit d9a2b0922d

View File

@ -583,9 +583,7 @@ func (i *Image) writePixels(pix []byte, x, y, width, height int) {
copy(pixb[4*j*r.Dx():], pix[4*j*width:4*(j+1)*width])
}
x += r.Min.X
y += r.Min.Y
i.backend.restorable.WritePixels(pixb, x, y, r.Dx(), r.Dy())
i.backend.restorable.WritePixels(pixb, r.Min.X, r.Min.Y, r.Dx(), r.Dy())
}
func (i *Image) ReadPixels(graphicsDriver graphicsdriver.Graphics, pixels []byte, x, y, width, height int) error {