I have a form with some GDI drawn rectangles on.
The user can specify the size and location of these rectangles.
I need some math to handle when the users specifies a rectangle that is beyond the bounds of the form.
I don't want to prevent oversizing, rather I want to constrain the rectangles within a given area but still preserve their relative positions and aspect ratios by reducing their size.
Hope that makes sense