I have four points that make up a rectangle (note: the four points have the same aspect ratio as the window). The rectangle itself can be moved and scaled (again, keeps it’s aspect ratio).
I want to map the root’s positions (_x, _y, _xscale, _yscale) so that the box is always the frame of the window. This should be easy enough, except for the fact that the root’s “hotspot” (position which it scales from) is always 0,0.
NOTE: I use four points to make the rectangle: xLeft, yTop and xRight, yBottom
If someone could help me come up with some code to change the root’s _x, _y, _xscale, and _yscale to fit this rectangle, it would really help me!