forked from AuroraMiddleware/gtk
pixbuf-engine: replace call to gdk_draw_pixbuf() with Cairo equivalent
This commit is contained in:
parent
59db821725
commit
a22ebc974f
@ -477,6 +477,9 @@ pixbuf_render (GdkPixbuf *src,
|
|||||||
|
|
||||||
if (tmp_pixbuf)
|
if (tmp_pixbuf)
|
||||||
{
|
{
|
||||||
|
cairo_t *cr;
|
||||||
|
|
||||||
|
cr = gdk_cairo_create (window);
|
||||||
if (mask)
|
if (mask)
|
||||||
{
|
{
|
||||||
gdk_pixbuf_render_threshold_alpha (tmp_pixbuf, mask,
|
gdk_pixbuf_render_threshold_alpha (tmp_pixbuf, mask,
|
||||||
@ -485,13 +488,15 @@ pixbuf_render (GdkPixbuf *src,
|
|||||||
rect.width, rect.height,
|
rect.width, rect.height,
|
||||||
128);
|
128);
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_draw_pixbuf (window, NULL, tmp_pixbuf,
|
gdk_cairo_set_source_pixbuf (cr,
|
||||||
x_offset, y_offset,
|
tmp_pixbuf,
|
||||||
rect.x, rect.y,
|
-x_offset + rect.x,
|
||||||
rect.width, rect.height,
|
-y_offset + rect.y);
|
||||||
GDK_RGB_DITHER_NORMAL,
|
gdk_cairo_rectangle (cr, &rect);
|
||||||
0, 0);
|
cairo_fill (cr);
|
||||||
|
|
||||||
|
cairo_destroy (cr);
|
||||||
g_object_unref (tmp_pixbuf);
|
g_object_unref (tmp_pixbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user