I have the following cases where rectangles overlap. enter image description here

I have the coordinates for the intersection rectangle(Blue). How can i offset the starting coordinates(top-left X-Y) of the 2 rectangles to prevent overlapping,provided that i have the coordinates of the intersection rectangle.

  • $\begingroup$ Aside from the coordinates of the intersection, what else do you know? Do you e.g know the coordinates of the two rectangles, or their length or width or ...? $\endgroup$ – Jens May 17 '17 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.