mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-04 03:45:58 -05:00
Reset transformation matrix when blitting off-screen canvas.
Closes #233.
This commit is contained in:
parent
0e2ae48b02
commit
d76d573eb2
1 changed files with 3 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue