Skip to content

Commit

Permalink
Fix cropping texture to selection
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 committed Dec 2, 2023
1 parent c3e218f commit 0abdf2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/texturing/edit_texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0abdf2d

Please sign in to comment.