mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-20 22:39:50 -05:00
Simplify Matrix#applyToContext()
This commit is contained in:
parent
56bec41877
commit
be8b46899d
1 changed files with 2 additions and 5 deletions
|
@ -637,12 +637,9 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
|
|||
* Applies this matrix to the specified Canvas Context.
|
||||
*
|
||||
* @param {CanvasRenderingContext2D} ctx
|
||||
* @param {Boolean} [reset=false]
|
||||
*/
|
||||
applyToContext: function(ctx, reset) {
|
||||
ctx[reset ? 'setTransform' : 'transform'](
|
||||
this._a, this._c, this._b, this._d, this._tx, this._ty);
|
||||
return this;
|
||||
applyToContext: function(ctx) {
|
||||
ctx.transform(this._a, this._c, this._b, this._d, this._tx, this._ty);
|
||||
},
|
||||
|
||||
statics: /** @lends Matrix */{
|
||||
|
|
Loading…
Reference in a new issue