summaryrefslogtreecommitdiff
path: root/gtk/gtkrendericon.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-12-14 02:33:21 +0100
committerMatthias Clasen <mclasen@redhat.com>2015-12-15 08:41:16 -0500
commite723fccaa975b710536f5073d110610344da9b17 (patch)
tree2e1c61ae8ea23e76bfcdb5f8437581f3a42d503e /gtk/gtkrendericon.c
parentb79a187d47ee5c45952fab60c141fcaed7e05ef6 (diff)
downloadgtk+-e723fccaa975b710536f5073d110610344da9b17.tar.gz
rendericon: Restore cairo matrix after rendering
Diffstat (limited to 'gtk/gtkrendericon.c')
-rw-r--r--gtk/gtkrendericon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c
index a6aecbcb45..081b660014 100644
--- a/gtk/gtkrendericon.c
+++ b/gtk/gtkrendericon.c
@@ -96,7 +96,7 @@ gtk_css_style_render_icon_surface (GtkCssStyle *style,
double y)
{
const GtkCssValue *shadows;
- cairo_matrix_t matrix, transform_matrix;
+ cairo_matrix_t matrix, transform_matrix, saved_matrix;
GdkRectangle extents;
g_return_if_fail (GTK_IS_CSS_STYLE (style));
@@ -114,6 +114,7 @@ gtk_css_style_render_icon_surface (GtkCssStyle *style,
return;
}
+ cairo_get_matrix (cr, &saved_matrix);
cairo_translate (cr, x + extents.x, y + extents.y);
if (_gtk_css_transform_value_get_matrix (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_ICON_TRANSFORM), &transform_matrix))
@@ -138,5 +139,7 @@ gtk_css_style_render_icon_surface (GtkCssStyle *style,
_gtk_css_shadows_value_paint_icon (shadows, cr);
cairo_paint (cr);
}
+
+ cairo_set_matrix (cr, &saved_matrix);
}