Fix cropping texture to selection

This commit is contained in:
JannisX11 2023-12-02 14:52:00 +01:00
parent c3e218fdf4
commit 0abdf2d366

View File

@ -826,7 +826,7 @@ BARS.defineActions(function() {
texture.width = texture.canvas.width = rect.width;
texture.height = texture.canvas.height = rect.height;
texture.ctx.imageSmoothingEnabled = false;
texture.ctx.drawImage(texture.img, rect.start_x, rect.start_y, texture.width, texture.height);
texture.ctx.drawImage(texture.img, -rect.start_x, -rect.start_y);
} else {
texture.width = texture.canvas.width = rect.width;
texture.height = texture.canvas.height = rect.height;