diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-27 20:25:31 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2011-07-27 20:25:31 +0000 |
commit | b429796924a240602537f8feae60d7bacd77183c (patch) | |
tree | 1fdde0371a0d97af8752b1d12adb050c3f2ff16a /gtk/sctp_byte_graph_dlg.c | |
parent | 8c0d1f9f6accf952a7a59846c9e6fc7b2c0748c8 (diff) |
Replace the remaining gdk_draw_pixmap().
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@38229 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk/sctp_byte_graph_dlg.c')
-rw-r--r-- | gtk/sctp_byte_graph_dlg.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/gtk/sctp_byte_graph_dlg.c b/gtk/sctp_byte_graph_dlg.c index c60ea88378..89a9dafcf6 100644 --- a/gtk/sctp_byte_graph_dlg.c +++ b/gtk/sctp_byte_graph_dlg.c @@ -898,6 +898,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer tsn_t *tsn, *tmptsn; PangoLayout *layout; GtkAllocation widget_alloc; + cairo_t *cr; g_snprintf(label_string, 15, "%d", 0); memcpy(label_string,(gchar *)g_locale_to_utf8(label_string, -1 , NULL, NULL, NULL), 15); @@ -924,14 +925,14 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t"); g_assert(ios != NULL); + cr = gdk_cairo_create (gtk_widget_get_window(u_data->io->draw_area)); + + gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0); gtk_widget_get_allocation(u_data->io->draw_area, &widget_alloc); - gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area), - gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)], - ios->pixmap, - 0, 0, - 0, 0, - widget_alloc.width, - widget_alloc.height); + cairo_rectangle (cr, 0, 0, widget_alloc.width, widget_alloc.height); + cairo_fill (cr); + + cairo_destroy (cr); x1_tmp=(guint32) floor(u_data->io->min_x+((u_data->io->x_old-LEFT_BORDER-u_data->io->offset)*u_data->io->tmp_width/u_data->io->axis_width)); x2_tmp=(guint32) floor(u_data->io->min_x+((event->x-LEFT_BORDER-u_data->io->offset)*u_data->io->tmp_width/u_data->io->axis_width)); @@ -1053,14 +1054,15 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer ios=(sctp_graph_t *)g_object_get_data(G_OBJECT(u_data->io->draw_area), "sctp_graph_t"); g_assert(ios != NULL); + cr = gdk_cairo_create (gtk_widget_get_window(u_data->io->draw_area)); + + gdk_cairo_set_source_pixmap (cr, ios->pixmap, 0, 0); gtk_widget_get_allocation(u_data->io->draw_area, &widget_alloc); - gdk_draw_pixmap(gtk_widget_get_window(u_data->io->draw_area), - gtk_widget_get_style(u_data->io->draw_area)->fg_gc[gtk_widget_get_state(u_data->io->draw_area)], - ios->pixmap, - 0, 0, - 0, 0, - widget_alloc.width, - widget_alloc.height); + cairo_rectangle (cr, 0, 0, widget_alloc.width, widget_alloc.height); + cairo_fill (cr); + + cairo_destroy (cr); + } } return TRUE; |