mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Fix context orientation bug correct proberly, by flipping shear values instead of scale values.
This commit is contained in:
parent
490ef78b53
commit
231343c6a2
1 changed files with 4 additions and 4 deletions
|
@ -455,12 +455,12 @@ var Matrix = Base.extend({
|
|||
* Applies this matrix to the specified Canvas Context.
|
||||
*/
|
||||
applyToContext: function(context, reset) {
|
||||
// Canvas contexts seem to use another orientation: The scaleX (m00) and
|
||||
// scaleY (m11) values need to be flipped to get correct behaviour e.g.
|
||||
// Canvas contexts seem to use another orientation: The shearX (m01) and
|
||||
// shearY (m10) values need to be flipped to get correct behaviour e.g.
|
||||
// when using rotation or shearing.
|
||||
context[reset ? 'setTransform' : 'transform'](
|
||||
-this._m00, this._m01, this._m10,
|
||||
-this._m11, this._m02, this._m12
|
||||
this._m00, -this._m01, -this._m10,
|
||||
this._m11, this._m02, this._m12
|
||||
);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue