I have two rectangle as show below, both can rotate both can be resized.
Now my question is, whenever yellow will move towards white Rectangle which is before 5px, Green rect edge. I should be notified when yellow rect will touch the white rect lines.
After doing a lot of work I am able to do when the both rectangle is not rotated. For the same way when that view rotated I should be notified. I have draw the white rect in first image. Please consider the same image for rotated one.