pix = gdk_pixbuf_get_pixels(pixbuf);
rs = gdk_pixbuf_get_rowstride(pixbuf);
+ /** @FIXME: x,y expected to be = 0. Maybe this is not the right place for scaling */
+ if (!options->image.use_clutter_renderer)
+ {
+ w = w * scale_factor();
+ h = h * scale_factor();
+ }
+
w = MIN(w, pixbuf_width - x);
h = MIN(h, pixbuf_height - y);
return g_file_delete(file, cancellable, error);
}
+/**
+ * @brief Retrieves the internal scale factor that maps from window coordinates to the actual device pixels
+ * @param -
+ * @returns scale factor
+ *
+ *
+ */
+gint scale_factor()
+{
+ LayoutWindow *lw = NULL;
+
+#if GTK_CHECK_VERSION(3, 10, 0)
+ layout_valid(&lw);
+ return gtk_widget_get_scale_factor(lw->window);
+#else
+ return 1;
+#endif
+}
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */
gboolean download_web_file(const gchar *text, gboolean minimized, gpointer data);
gboolean rmdir_recursive(GFile *file, GCancellable *cancellable, GError **error);
+gint scale_factor();
+
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */