diff options
Diffstat (limited to 'gtk/inspector/recordingrenderops.c')
-rw-r--r-- | gtk/inspector/recordingrenderops.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/inspector/recordingrenderops.c b/gtk/inspector/recordingrenderops.c index 509acb82e8..a30c2d641d 100644 --- a/gtk/inspector/recordingrenderops.c +++ b/gtk/inspector/recordingrenderops.c @@ -24,6 +24,7 @@ #include "gtkrenderoperationbackground.h" #include "gtkrenderoperationborder.h" #include "gtkrenderoperationcairo.h" +#include "gtkrenderoperationicon.h" #include "gtkrenderoperationoutline.h" #include "gtkrenderoperationwidget.h" #include "gtkwidget.h" @@ -162,6 +163,26 @@ gtk_recording_render_ops_draw_outline (GtkRenderOps *ops, g_object_unref (oper); } +static void +gtk_recording_render_ops_draw_icon (GtkRenderOps *ops, + GtkCssStyle *style, + cairo_t *cr, + gdouble x, + gdouble y, + gdouble width, + gdouble height, + GtkCssImageBuiltinType builtin_type) +{ + GtkRecordingRenderOps *record = GTK_RECORDING_RENDER_OPS (ops); + GtkRenderOperation *oper; + + gtk_recording_render_ops_save_snapshot (record, cr); + + oper = gtk_render_operation_icon_new (style, x, y, width, height, builtin_type); + gtk_render_operation_widget_add_operation (record->widgets->data, oper); + g_object_unref (oper); +} + static cairo_t * gtk_recording_render_ops_begin_draw_widget (GtkRenderOps *ops, GtkWidget *widget, @@ -218,6 +239,7 @@ gtk_recording_render_ops_class_init (GtkRecordingRenderOpsClass *klass) ops_class->draw_background = gtk_recording_render_ops_draw_background; ops_class->draw_border = gtk_recording_render_ops_draw_border; ops_class->draw_outline = gtk_recording_render_ops_draw_outline; + ops_class->draw_icon = gtk_recording_render_ops_draw_icon; } static void |