Function clamp_canvas

Source
fn clamp_canvas(w: u32, h: u32, max_width: u32) -> (u32, u32)
Expand description

preview_max_width applied to a canvas size, keeping the aspect ratio. Must match Player::set_canvas, or the GPU renders at a different shape than the player decodes at.