pub fn fit_within( width: u32, height: u32, max_width: u32, max_height: u32, ) -> Result<(u32, u32), ResolutionError>