oa::ui::sdl_events::window_pixel_scale

Compute logical→physical pixel scale for one window. Returns (scale_x, scale_y). Both default to 1.0 when the window is zero-size or the query fails.

FnRust public API

Function Documentation

pub fn window_pixel_scale(window: &Window) -> ( f32, f32 )
Compute logical→physical pixel scale for one window. Returns (scale_x, scale_y). Both default to 1.0 when the window is zero-size or the query fails.