Simplify Matrix#applyToContext()

This commit is contained in:
Jürg Lehni 2013-03-19 21:35:41 -07:00
parent 56bec41877
commit be8b46899d

View file

@ -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 */{