Returns a rectangle where the longest length of rect will be equal to the shortest length of to. The shortest length of rect will be proportionally scaled to match the aspect ratio of rect. The returned rectangle will be centered within to.
rect
to
cropFit
Returns a rectangle where the longest length of
rectwill be equal to the shortest length ofto. The shortest length ofrectwill be proportionally scaled to match the aspect ratio ofrect. The returned rectangle will be centered withinto.