From b10454a83c540b9588e4d20515f9757304099f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Sat, 9 Feb 2013 12:18:40 -0800 Subject: [PATCH] Rename Matrix#createInverse() to #inverted() and #createShiftless() to #shiftless(). --- src/basic/Matrix.js | 4 ++-- src/path/Path.js | 2 +- src/svg/SvgExport.js | 2 +- src/svg/SvgImport.js | 2 +- src/ui/View.js | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/basic/Matrix.js b/src/basic/Matrix.js index 02482d51..73ed3d13 100644 --- a/src/basic/Matrix.js +++ b/src/basic/Matrix.js @@ -618,7 +618,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{ * @return {Matrix} The inverted matrix, or {@code null }, if the matrix is * singular */ - createInverse: function() { + inverted: function() { var det = this._getDeterminant(); return det && Matrix.create( this._d / det, @@ -629,7 +629,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{ (this._c * this._tx - this._a * this._ty) / det); }, - createShiftless: function() { + shiftless: function() { return Matrix.create(this._a, this._c, this._b, this._d, 0, 0); }, diff --git a/src/path/Path.js b/src/path/Path.js index 16d98698..382214c6 100644 --- a/src/path/Path.js +++ b/src/path/Path.js @@ -1997,7 +1997,7 @@ statics: { // and calculate the bounding box of the resulting rotated elipse: // Get rotated hor and ver vectors, and determine rotation angle // and elipse values from them: - var mx = matrix.createShiftless(), + var mx = matrix.shiftless(), hor = mx.transform(Point.create(radius, 0)), ver = mx.transform(Point.create(0, radius)), phi = hor.getAngleInRadians(), diff --git a/src/svg/SvgExport.js b/src/svg/SvgExport.js index e26bca85..95219094 100644 --- a/src/svg/SvgExport.js +++ b/src/svg/SvgExport.js @@ -53,7 +53,7 @@ new function() { // in rotate(). To do so, SVG requries us to inverse transform the // translation point by the matrix itself, since they are provided // in local coordinates. - matrix = matrix.createShiftless(); + matrix = matrix.shiftless(); var point = matrix._inverseTransform(trans); attrs.x = point.x; attrs.y = point.y; diff --git a/src/svg/SvgImport.js b/src/svg/SvgImport.js index c88708b3..c7d43a44 100644 --- a/src/svg/SvgImport.js +++ b/src/svg/SvgImport.js @@ -454,7 +454,7 @@ new function() { scale = size ? rectangle.getSize().divide(size) : 1, offset = rectangle.getPoint(), matrix = new Matrix().translate(offset).scale(scale); - item.transform(matrix.createInverse()); + item.transform(matrix.inverted()); if (size) rectangle.setSize(size); rectangle.setPoint(0); diff --git a/src/ui/View.js b/src/ui/View.js index 59af62da..7dca20e4 100644 --- a/src/ui/View.js +++ b/src/ui/View.js @@ -393,7 +393,7 @@ var View = this.View = Base.extend(Callback, /** @lends View# */{ _getInverse: function() { if (!this._inverse) - this._inverse = this._matrix.createInverse(); + this._inverse = this._matrix.inverted(); return this._inverse; }