From d76d573eb2d0d13561d86133111fa20bfb392dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 29 May 2013 13:52:47 -0700 Subject: [PATCH] Reset transformation matrix when blitting off-screen canvas. Closes #233. --- src/item/Item.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/item/Item.js b/src/item/Item.js index ecb3d159..eee340a3 100644 --- a/src/item/Item.js +++ b/src/item/Item.js @@ -2915,6 +2915,9 @@ var Item = Base.extend(Callback, /** @lends Item# */{ // Otherwise just set the globalAlpha before drawing the // temporary canvas on the parent canvas. parentCtx.save(); + // Reset transformations, since we're blitting and pixel + // scale and with a given offset. + parentCtx.setTransform(1, 0, 0, 1, 0, 0); parentCtx.globalAlpha = this._opacity; parentCtx.drawImage(ctx.canvas, itemOffset.x, itemOffset.y); parentCtx.restore();