Rename Matrix#createInverse() to #inverted() and #createShiftless() to #shiftless().

This commit is contained in:
Jürg Lehni 2013-02-09 12:18:40 -08:00
parent d70fdb69d3
commit b10454a83c
5 changed files with 6 additions and 6 deletions

View file

@ -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);
},

View file

@ -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(),

View file

@ -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;

View file

@ -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);

View file

@ -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;
}