Add dest and dontNotifty arguments to Matrix#_transformBounds() and use them where appropriate.

This commit is contained in:
Jürg Lehni 2011-11-24 11:29:35 +01:00
parent 3f5e68aa76
commit 1d6cfeeb9b
3 changed files with 13 additions and 6 deletions
src/basic

View file

@ -414,7 +414,7 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
* point and finding the new bounding box to these points. This is not
* really the transformed reactangle!
*/
_transformBounds: function(bounds) {
_transformBounds: function(bounds, dest, dontNotify) {
var coords = this._transformCorners(bounds),
min = coords.slice(0, 2),
max = coords.slice(0);
@ -426,8 +426,10 @@ var Matrix = this.Matrix = Base.extend(/** @lends Matrix# */{
else if (val > max[j])
max[j] = val;
}
return Rectangle.create(min[0], min[1],
max[0] - min[0], max[1] - min[1]);
if (!dest)
dest = new Rectangle(Rectangle.dont);
return dest.set(min[0], min[1], max[0] - min[0], max[1] - min[1],
dontNotify);
},
/**