def extend_bounding_box()

in src/block_helper.py [0:0]


    def extend_bounding_box(self, boundingBox):
        """Extend the BoundingBox object's dimensions to another BoundingBox object."""
        selfRight = self.Left + self.Width
        selfBottom = self.Top + self.Height
        bbRight = boundingBox.Left + boundingBox.Width
        bbBottom = boundingBox.Top + boundingBox.Height
        self.Width = abs(min(self.Left, boundingBox.Left) - max(selfRight, bbRight))
        self.Height = abs(min(self.Top, boundingBox.Top) - max(selfBottom, bbBottom))
        if self.Left > boundingBox.Left:
            self.Left = boundingBox.Left
        if self.Top > boundingBox.Top:
            self.Top = boundingBox.Top