Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

Thanks, I knew it had to be there somewhere.

 

I see this forum now has some sort of contextual advertising. My use of the word "long-winded" seems to have led to an offer for $300 free at CaesarsPalace.com. How kind of them!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...