Is there a built in function that will take two rectangles and return the smallest rectangle that contains them both? I've looked under the Rectangle object and can't find anything. I can do:
With Rectangle2
R = Rectangle.FromLTRB(Min(R.Left, .Left), Min(R.Top, .Top), Max(R.Right, .Right), Max(R.Bottom, .Bottom))
End With
But it's a bit long-winded.
With Rectangle2
R = Rectangle.FromLTRB(Min(R.Left, .Left), Min(R.Top, .Top), Max(R.Right, .Right), Max(R.Bottom, .Bottom))
End With
But it's a bit long-winded.