diff --git a/src/pixi/text/Text.js b/src/pixi/text/Text.js index e8647dc..7cd251a 100644 --- a/src/pixi/text/Text.js +++ b/src/pixi/text/Text.js @@ -490,6 +490,24 @@ }; /** +* Returns the bounds of the Text as a rectangle. The bounds calculation takes the worldTransform into account. +* +* @method getBounds +* @param matrix {Matrix} the transformation matrix of the Text +* @return {Rectangle} the framing rectangle +*/ +PIXI.Text.prototype.getBounds = function(matrix) +{ + if(this.dirty) + { + this.updateText(); + this.dirty = false; + } + + return PIXI.Sprite.prototype.getBounds.call(this, matrix); +}; + +/** * Destroys this text object. * * @method destroy