diff options
author | Benjamin Otte <otte@redhat.com> | 2016-01-06 18:14:11 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-01-11 17:03:07 +0100 |
commit | 0138af9f9684c0ec436b37e5962e9f82607d3ff8 (patch) | |
tree | 9d6ff7435a452ef946145b51a090f74b2cbba396 /gtk | |
parent | 4e627e108e1b8af5bf2ffc4fdd6dc2eab3ad1166 (diff) | |
download | gtk+-0138af9f9684c0ec436b37e5962e9f82607d3ff8.tar.gz |
rendericon: Save and restore cairo matrix
... instead of requiring cairo_save()/cairo_restore().
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkrendericon.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c index 2c756a4929..cacd5109c4 100644 --- a/gtk/gtkrendericon.c +++ b/gtk/gtkrendericon.c @@ -39,7 +39,7 @@ gtk_css_style_render_icon (GtkCssStyle *style, GtkCssImageBuiltinType builtin_type) { const GtkCssValue *shadows; - cairo_matrix_t matrix, transform_matrix; + cairo_matrix_t matrix, transform_matrix, saved_matrix; GtkCssImage *image; g_return_if_fail (GTK_IS_CSS_STYLE (style)); @@ -49,6 +49,8 @@ gtk_css_style_render_icon (GtkCssStyle *style, if (image == NULL) return; + cairo_get_matrix (cr, &saved_matrix); + shadows = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_ICON_SHADOW); cairo_translate (cr, x, y); @@ -75,6 +77,8 @@ gtk_css_style_render_icon (GtkCssStyle *style, cairo_paint (cr); } } + + cairo_set_matrix (cr, &saved_matrix); } gboolean |