rbulph Posted December 13, 2007 Posted December 13, 2007 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. Quote
Administrators PlausiblyDamp Posted December 13, 2007 Administrators Posted December 13, 2007 Would http://msdn2.microsoft.com/en-us/library/system.drawing.rectangle.union.aspx not do the job? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
rbulph Posted December 13, 2007 Author Posted December 13, 2007 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! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.