Function tetra::window::get_dpi_scale[][src]

pub fn get_dpi_scale(ctx: &Context) -> f32
Expand description

Returns the ratio of the logical resolution to the physical resolution of the current display on which the window is being displayed.

This will usually be 1.0, but if high DPI support is enabled and the monitor is high DPI, it may be higher. For example, on a Mac with a retina display, this can return 2.0.