[eog] Use the preferred interpolation type when zoomed instead of assuming the right one



commit 3d1859e321b9dea27e49bab9626044f3f5835420
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Wed Dec 14 14:56:31 2011 +0200

    Use the preferred interpolation type when zoomed instead of assuming the right one
    
    https://bugzilla.gnome.org/show_bug.cgi?id=665897

 src/eog-scroll-view.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c
index 7b707e4..313891f 100644
--- a/src/eog-scroll-view.c
+++ b/src/eog-scroll-view.c
@@ -1875,9 +1875,11 @@ display_draw (GtkWidget *widget, cairo_t *cr, gpointer data)
 		cairo_scale (cr, priv->zoom, priv->zoom);
 		cairo_set_source_surface (cr, priv->surface, xofs/priv->zoom, yofs/priv->zoom);
 		cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_PAD);
-		if ((is_zoomed_in (view) && priv->interp_type_in == CAIRO_FILTER_NEAREST) ||
-		    (is_zoomed_out (view) && priv->interp_type_out == CAIRO_FILTER_NEAREST))
-			cairo_pattern_set_filter (cairo_get_source (cr), CAIRO_FILTER_NEAREST);
+		if (is_zoomed_in (view))
+			cairo_pattern_set_filter (cairo_get_source (cr), priv->interp_type_in);
+		else if (is_zoomed_out (view))
+			cairo_pattern_set_filter (cairo_get_source (cr), priv->interp_type_out);
+
 		cairo_paint (cr);
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]