diff --git a/src/core/renderers/canvas/utils/CanvasTinter.js b/src/core/renderers/canvas/utils/CanvasTinter.js index c4447e8..7ccd2da 100644 --- a/src/core/renderers/canvas/utils/CanvasTinter.js +++ b/src/core/renderers/canvas/utils/CanvasTinter.js @@ -66,7 +66,13 @@ { var context = canvas.getContext( '2d' ); - var crop = texture.crop; + var resolution = texture.baseTexture.resolution; + + var crop = texture.crop.clone(); + crop.x *= resolution; + crop.y *= resolution; + crop.width *= resolution + crop.height *= resolution; canvas.width = crop.width; canvas.height = crop.height; @@ -115,7 +121,13 @@ { var context = canvas.getContext( '2d' ); - var crop = texture.crop; + var resolution = texture.baseTexture.resolution; + + var crop = texture.crop.clone(); + crop.x *= resolution; + crop.y *= resolution; + crop.width *= resolution + crop.height *= resolution; canvas.width = crop.width; canvas.height = crop.height; @@ -151,7 +163,13 @@ { var context = canvas.getContext( '2d' ); - var crop = texture.crop; + var resolution = texture.baseTexture.resolution; + + var crop = texture.crop.clone(); + crop.x *= resolution; + crop.y *= resolution; + crop.width *= resolution + crop.height *= resolution; canvas.width = crop.width; canvas.height = crop.height;