summaryrefslogtreecommitdiff
path: root/gtk/gtktextutil.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-08-15 19:41:51 +0200
committerBenjamin Otte <otte@redhat.com>2010-09-26 15:03:01 +0200
commit331999d84db1dfaa14a00a1dc423be12dc33e9a9 (patch)
tree987fe4783403bb839b0a2cd2750b829d436ba4eb /gtk/gtktextutil.c
parentac48f2330df7b367e5afc12947bf9de8d10b3a89 (diff)
downloadgtk+-331999d84db1dfaa14a00a1dc423be12dc33e9a9.tar.gz
textview: API: change gtk_text_layout_draw() to take a cairo_t
This simplifies the API a lot and allows more magic to happen later.
Diffstat (limited to 'gtk/gtktextutil.c')
-rw-r--r--gtk/gtktextutil.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/gtktextutil.c b/gtk/gtktextutil.c
index 723a5eed9e..262f89b5c1 100644
--- a/gtk/gtktextutil.c
+++ b/gtk/gtktextutil.c
@@ -367,12 +367,12 @@ _gtk_text_util_create_rich_drag_icon (GtkWidget *widget,
gdk_cairo_set_source_color (cr, &widget_style->base [gtk_widget_get_state (widget)]);
cairo_paint (cr);
- gtk_text_layout_draw (layout, widget, drawable,
- NULL,
- - (1 + DRAG_ICON_LAYOUT_BORDER),
- - (1 + DRAG_ICON_LAYOUT_BORDER),
- 0, 0,
- pixmap_width, pixmap_height, NULL);
+ cairo_save (cr);
+
+ cairo_translate (cr, 1 + DRAG_ICON_LAYOUT_BORDER, 1 + DRAG_ICON_LAYOUT_BORDER);
+ gtk_text_layout_draw (layout, widget, cr, NULL);
+
+ cairo_restore (cr);
cairo_set_source_rgb (cr, 0, 0, 0);
cairo_rectangle (cr, 0.5, 0.5, pixmap_width + 1, pixmap_height + 1);