mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-12-09 04:50:29 +08:00
Fix cropping texture to selection
This commit is contained in:
parent
c3e218fdf4
commit
0abdf2d366
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user