]> Pileus Git - ~andy/gtk/commitdiff
image: replace gdk_draw_pixbuf() call with Cairo equivalent
authorBenjamin Otte <otte@redhat.com>
Mon, 12 Jul 2010 12:25:53 +0000 (14:25 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 26 Jul 2010 14:42:46 +0000 (16:42 +0200)
gtk/gtkimage.c

index 07dacf3e4752f9bd6e9df246e5abec63f0aeb49a..c20f925ce0059c4777fe476266905ae1826d5e4a 100644 (file)
@@ -2194,17 +2194,11 @@ gtk_image_expose (GtkWidget      *widget,
 
               if (pixbuf)
                 {
-                  gdk_draw_pixbuf (widget->window,
-                                  widget->style->black_gc,
-                                  pixbuf,
-                                  image_bound.x - x,
-                                  image_bound.y - y,
-                                  image_bound.x,
-                                  image_bound.y,
-                                  image_bound.width,
-                                  image_bound.height,
-                                  GDK_RGB_DITHER_NORMAL,
-                                  0, 0);
+                  cairo_t *cr = gdk_cairo_create (widget->window);
+                  gdk_cairo_set_source_pixbuf (cr, pixbuf, x, y);
+                  gdk_cairo_rectangle (cr, &image_bound);
+                  cairo_fill (cr);
+                  cairo_destroy (cr);
                 }
             }
           else