mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 19:30:10 +00:00
image: replace gdk_draw_pixbuf() call with Cairo equivalent
This commit is contained in:
parent
0310626938
commit
847d401df3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user