Package: gdk

Accessor gdk:surface-scale

Lambda List

gdk:surface-scale (object)

Syntax

(gdk:surface-scale object) => scale
(setf (gdk:surface-scale object) scale)

Arguments

object -- a gdk:surface object
scale -- a double float for the scale

Details

The accessor for the scale slot of the gdk:surface class returns the internal scale that maps from surface coordinates to the actual device pixels. When the scale is bigger than 1, the windowing system prefers to get buffers with a resolution that is bigger than the surface size, for example, to show the surface on a high-resolution display, or in a magnifier.

Compare with the gdk:surface-scale-factor function, which returns the next larger integer.

The scale may change during the lifetime of the surface.

Since 4.12
 

See also

2025-08-02