[gtk+/wip/otte/gadget: 14/18] rendericon: Restore cairo matrix after rendering
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gadget: 14/18] rendericon: Restore cairo matrix after rendering
- Date: Tue, 15 Dec 2015 00:26:56 +0000 (UTC)
commit d21be3ed528c3a81ee491e5b5fcc2bdddef50d7c
Author: Benjamin Otte <otte redhat com>
Date: Mon Dec 14 02:33:21 2015 +0100
rendericon: Restore cairo matrix after rendering
gtk/gtkrendericon.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c
index a6aecbc..081b660 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]