Function tetra::graphics::scaling::get_screen_rect[][src]

pub fn get_screen_rect(
    mode: ScalingMode,
    inner_width: i32,
    inner_height: i32,
    outer_width: i32,
    outer_height: i32
) -> Rectangle

Converts a screen’s dimensions into a rectangle that is scaled to fit in the given bounds.

This function may be useful if you want to use Tetra’s scaling algorithms, but the built-in ScreenScaler abstraction does not fit your needs.