def getDirtyBox(self, point, tool):
        """
        Returns a box around the Brush given point and size of the brush.
        """
        if hasattr(self.brushMode, 'createDirtyBox'):
            return self.brushMode.createDirtyBox(self.brushMode, point, tool)
        else:
            size = tool.getBrushSize()
            origin = map(lambda x, s: x - (s >> 1), point, size)
            return BoundingBox(origin, size)

        Returns a box around the Brush given point and size of the brush.
        
editortools/brush.py