Skip to main content

set_device_scale

Function set_device_scale 

Source
pub fn set_device_scale(scale: f64)
Expand description

Set the device scale factor.

Call this at application startup and whenever the window moves to a monitor with a different DPI. A value of 1.0 means one logical unit equals one physical pixel.

ยงPanics

Panics in debug builds if scale is not positive.