Reset transformation matrix when blitting off-screen canvas.

Closes #233.
This commit is contained in:
Jürg Lehni 2013-05-29 13:52:47 -07:00
parent 0e2ae48b02
commit d76d573eb2

View file

@ -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();