|
|
@ -46,6 +46,8 @@ function addContextCurrentTransform(ctx) { |
|
|
|
// If the context doesn't expose a `mozCurrentTransform`, add a JS based on.
|
|
|
|
// If the context doesn't expose a `mozCurrentTransform`, add a JS based on.
|
|
|
|
if (!ctx.mozCurrentTransform) { |
|
|
|
if (!ctx.mozCurrentTransform) { |
|
|
|
// Store the original context
|
|
|
|
// Store the original context
|
|
|
|
|
|
|
|
ctx._scaleX = ctx._scaleX || 1.0; |
|
|
|
|
|
|
|
ctx._scaleY = ctx._scaleY || 1.0; |
|
|
|
ctx._originalSave = ctx.save; |
|
|
|
ctx._originalSave = ctx.save; |
|
|
|
ctx._originalRestore = ctx.restore; |
|
|
|
ctx._originalRestore = ctx.restore; |
|
|
|
ctx._originalRotate = ctx.rotate; |
|
|
|
ctx._originalRotate = ctx.rotate; |
|
|
@ -53,7 +55,7 @@ function addContextCurrentTransform(ctx) { |
|
|
|
ctx._originalTranslate = ctx.translate; |
|
|
|
ctx._originalTranslate = ctx.translate; |
|
|
|
ctx._originalTransform = ctx.transform; |
|
|
|
ctx._originalTransform = ctx.transform; |
|
|
|
|
|
|
|
|
|
|
|
ctx._transformMatrix = [1, 0, 0, 1, 0, 0]; |
|
|
|
ctx._transformMatrix = [ctx._scaleX, 0, 0, ctx._scaleY, 0, 0]; |
|
|
|
ctx._transformStack = []; |
|
|
|
ctx._transformStack = []; |
|
|
|
|
|
|
|
|
|
|
|
Object.defineProperty(ctx, 'mozCurrentTransform', { |
|
|
|
Object.defineProperty(ctx, 'mozCurrentTransform', { |
|
|
|