diff options
author | Benjamin Otte <otte@redhat.com> | 2015-01-20 05:21:15 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2015-01-20 06:30:20 +0100 |
commit | 8c745088d5376ba399985dad98d82311218ca548 (patch) | |
tree | 8d732c69b1ba15ea6672fc3f73e74849ef22d529 /gtk/gtkrendericon.c | |
parent | f6d64f65915d7bfe091497fdd5cf90e98115a928 (diff) | |
download | gtk+-8c745088d5376ba399985dad98d82311218ca548.tar.gz |
render: Split icon surface rendering out
Just like normal icons, icon surfaces belong into gtkrendericon.c.
Diffstat (limited to 'gtk/gtkrendericon.c')
-rw-r--r-- | gtk/gtkrendericon.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk/gtkrendericon.c b/gtk/gtkrendericon.c index 8d8f19502e..3d3fbb754a 100644 --- a/gtk/gtkrendericon.c +++ b/gtk/gtkrendericon.c @@ -74,3 +74,21 @@ gtk_css_style_render_icon (GtkCssStyle *style, } } +void +gtk_css_style_render_icon_surface (GtkCssStyle *style, + cairo_t *cr, + cairo_surface_t *surface, + double x, + double y) +{ + g_return_if_fail (GTK_IS_CSS_STYLE (style)); + g_return_if_fail (cr != NULL); + g_return_if_fail (surface != NULL); + + cairo_set_source_surface (cr, surface, x, y); + + _gtk_css_shadows_value_paint_icon (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_ICON_SHADOW), cr); + + cairo_paint (cr); +} + |