### Method

# Gtk Widget get_scale_factor

#### Declaration [src]

    int
    gtk_widget_get_scale_factor (
      GtkWidget* widget
    )

#### Description [src]

Retrieves the internal scale factor that maps from window coordinates to the actual device pixels.

On traditional systems this is 1, on high density outputs, it can be a higher value (typically 2).

See `gdk_surface_get_scale_factor()`.

Note that modern systems may support fractional scaling, where the scale factor is not an integer. On such systems, this function will return the next higher integer value, but you probably want to use `gdk_surface_get_scale()` to get the fractional scale value.

Gets property | `Gtk.Widget:scale-factor`

#### Return value

Type: `int`

The scale factor for `widget`.