public virtual Rect GetBounds(DisplayObject targetSpace)
{
EnsureSizeCorrect();
if (targetSpace == this || _contentRect.width == 0 || _contentRect.height == 0) // optimization
{
return _contentRect;
}
else if (targetSpace == parent && _rotation.z == 0)
{
float sx = this.scaleX;
float sy = this.scaleY;
return new Rect(this.x, this.y, _contentRect.width * sx, _contentRect.height * sy);
}
else
return TransformRect(_contentRect, targetSpace);
}