pub fn resolve_output_resolution(
    width: u32,
    height: u32,
    output_width: Option<u32>,
    output_height: Option<u32>,
    pixel_ratio: Option<Ratio<u32>>
) -> Result<(u32, u32), ResolutionError>
Expand description

Identify the intended output resolution based on a combination of the input resolution, the desired output dimensions, and/or the pixel ratio.

Only the following combinations of are valid:

  • output_width and output_height;
  • pixel_ratio and output_width;
  • pixel_ratio and output_height.