- // Fits a rectangle of the given size to the current aspect ratio
- // (aspect_nom/aspect_denom) and returns the new width and height.
- unsigned fit_rectangle_to_aspect(unsigned width, unsigned height);
+ // Make sure the output rectangle is at least large enough to hold
+ // the given input rectangle in both dimensions, and is of the
+ // current aspect ratio (aspect_nom/aspect_denom).
+ void size_rectangle_to_fit(unsigned width, unsigned height, unsigned *output_width, unsigned *output_height);