0

Hi, I have a rectangle inside another rectangle, how can I make to do like an IntersectWith method but just the outer rectangle Border?

Since one rectangle is inside the other it seems like it is always intersecting so I want to know how to tell the inner rectangle to do something only if it intersects with the outter rectangle border.

Thanks in advance

Edited by MrCapuchino: n/a

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by Rynkadink
0

I belive you have the coords/position of one vertex of each rectangle; Having this and the lenght of the sides it's quite simple, I guess.
Taking as reference the top left vertex of the outter rectangle and comparing with the position of the top left vertex of the inner rectangle (considering the sides lenght) you are able to know if the edges are intersecting.

0

Ok,

Yeah that will work, I thought I might find a method that did that for me, just in case I resized the rectangles but that will work

Thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.