I hope I have phrased my question correctly.
Let's assume I have a rectangle with a width and height of X and Y.
Then I pick an aspect ratio of 0.56.
How can I calculate the size of the rectangle that bounds the original rectangle, without shrinking it?
In other words, I want to keep the original rectangle as is, and "place" it inside a canvas that obeys the aspect ratio, I'm trying to calculate the canvas size.
Any help would be highly appreciated.
Best regards,
Roi
Let $x, y$ be the dimensions of the window that you want to fit into a canvas with aspect ratio $r$. Let the desired dimensions of the canvas be $x', y'$. In all cases, we must have $y'/x' = r$. Three cases: