docs: function calculateEntityBoundingRect(entity, parentsMatrix, withChildren) {
  		var matrix = entity.getMatrix();
  		if (parentsMatrix) {
  			matrix = parentsMatrix.multiplyNew(matrix);
  		}
  
  		var thisBoundingRect = {left: 0, right: entity.width, top: 0, bottom: entity.height};
  
  		var targetCoordinates = [
  			{x: thisBoundingRect.left, y: thisBoundingRect.top},
  			{x: thisBoundingRect.left, y: thisBoundingRect.bottom},
  			{x: thisBoundingRect.right, y: thisBoundingRect.top},
  			{x: thisBoundingRect.right, y: thisBoundingRect.bottom}
  		];
  		var convertedPoint = matrix.multiplyPoint(targetCoordinates[0]);
  		var result = {left: convertedPoint.x, right: convertedPoint.x, top: convertedPoint.y, bottom: convertedPoint.y};
  		for (var i = 1; i < targetCoordinates.length; ++i) {
  			convertedPoint = matrix.multiplyPoint(targetCoordinates[i]);
  			if (result.left > convertedPoint.x)
  				result.left = convertedPoint.x;
  			if (result.right < convertedPoint.x)
  				result.right = convertedPoint.x;
  			if (result.top > convertedPoint.y)
  				result.top = convertedPoint.y;
  			if (result.bottom < convertedPoint.y)
  				result.bottom = convertedPoint.y;
  		};
  		if (withChildren && entity.children !== undefined) {
  			for (var i = 0; i < entity.children.length; ++i) {
  				var nowResult = calculateEntityBoundingRect(entity.children[i], matrix, true);
  				if (nowResult) {
  					if (result.left > nowResult.left)
  						result.left = nowResult.left;
  					if (result.right < nowResult.right)
  						result.right = nowResult.right;
  					if (result.top > nowResult.top)
  						result.top = nowResult.top;
  					if (result.bottom < nowResult.bottom)
  						result.bottom = nowResult.bottom;
  				}
  			};
  		}
  		return result;
  	}