Package: gdk

Function gdk-window-scale-factor

Lambda List

gdk-window-scale-factor (window)

Arguments

window -- a gdk-window object to get scale factor for

Return Value

A :int with the scale factor.

Details

Returns the internal scale factor that maps from window coordiantes to the actual device pixels. On traditional systems this is 1, but on very high density outputs this can be a higher value (often 2).

A higher value means that drawing is automatically scaled up to a higher resolution, so any code doing drawing will automatically look nicer. However, if you are supplying pixel-based data the scale value can be used to determine whether to use a pixel resource with higher resolution data.

The scale of a window may change during runtime, if this happens a configure event will be sent to the toplevel window.
 

See also

2020-9-23