my scenario is
given blue rectangle with width, height, center x0, y0, rotate in any angle.
given green rectangle with width, height, center x1, y1, rotate in any angle.
the green rectangle always larger than blue.
How to calculate the dragging area of green rectangle so it always contain the blue?
I have video to visualize what I want.
I can limit the movement of green rectangle without rotation.
I try to create the red one, boundary of blue, have the same angle of the green rectangle, but dont know how to “convert” top left (x,y) from rotated context to default normal context (without rotation).
Many thanks.