[gtk+/rendering-cleanup: 5/40] image: replace gdk_draw_pixbuf() call with Cairo equivalent
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup: 5/40] image: replace gdk_draw_pixbuf() call with Cairo equivalent
- Date: Tue, 13 Jul 2010 22:28:24 +0000 (UTC)
commit 4bac7e6e2c08831b48ead4da5279e9054ef23405
Author: Benjamin Otte <otte redhat com>
Date: Mon Jul 12 14:25:53 2010 +0200
image: replace gdk_draw_pixbuf() call with Cairo equivalent
gtk/gtkimage.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index a234e4a..a9b4e75 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -2112,17 +2112,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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]