textview: replace gdk_draw_pixbuf() call with Cairo version
This commit is contained in:
@ -317,16 +317,13 @@ gtk_text_renderer_draw_shape (PangoRenderer *renderer,
|
|||||||
if (gdk_rectangle_intersect (&pixbuf_rect, &text_renderer->clip_rect,
|
if (gdk_rectangle_intersect (&pixbuf_rect, &text_renderer->clip_rect,
|
||||||
&draw_rect))
|
&draw_rect))
|
||||||
{
|
{
|
||||||
gdk_draw_pixbuf (text_renderer->drawable,
|
cairo_t *cr = gdk_cairo_create (text_renderer->drawable);
|
||||||
fg_gc,
|
|
||||||
pixbuf,
|
gdk_cairo_set_source_pixbuf (cr, pixbuf, pixbuf_rect.x, pixbuf_rect.y);
|
||||||
draw_rect.x - pixbuf_rect.x,
|
gdk_cairo_rectangle (cr, &draw_rect);
|
||||||
draw_rect.y - pixbuf_rect.y,
|
cairo_fill (cr);
|
||||||
draw_rect.x, draw_rect.y,
|
|
||||||
draw_rect.width,
|
cairo_destroy (cr);
|
||||||
draw_rect.height,
|
|
||||||
GDK_RGB_DITHER_NORMAL,
|
|
||||||
0, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (GTK_IS_WIDGET (attr->data))
|
else if (GTK_IS_WIDGET (attr->data))
|
||||||
|
Reference in New Issue
Block a user