summaryrefslogtreecommitdiff
path: root/gtk/gtkcssshadowvalue.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-12-19 00:45:35 +0100
committerBenjamin Otte <otte@redhat.com>2016-12-20 18:01:12 +0100
commit2480e0d57530b72a8efa4fefeff98971b61e16da (patch)
treed3cfc00d1b527c4a87c5745389ce98e61d90870a /gtk/gtkcssshadowvalue.c
parent071c9a8221b53ab3e3586349187119221621d00a (diff)
downloadgtk+-2480e0d57530b72a8efa4fefeff98971b61e16da.tar.gz
gsk: Add GskShadowNode
... and make the icon rendering code use it. This requires moving even more shadow renering code into GSK, but so be it. At least the "shadows not implemented" warning is now gone!
Diffstat (limited to 'gtk/gtkcssshadowvalue.c')
-rw-r--r--gtk/gtkcssshadowvalue.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkcssshadowvalue.c b/gtk/gtkcssshadowvalue.c
index f68a39e66c..c0cccd7835 100644
--- a/gtk/gtkcssshadowvalue.c
+++ b/gtk/gtkcssshadowvalue.c
@@ -625,6 +625,17 @@ gtk_css_shadow_value_get_extents (const GtkCssValue *shadow,
border->left = MAX (0, ceil (clip_radius + spread - hoffset));
}
+void
+gtk_css_shadow_value_get_shadow (const GtkCssValue *value,
+ GskShadow *shadow)
+{
+ shadow->color = *_gtk_css_rgba_value_get_rgba (value->color);
+ shadow->dx = _gtk_css_number_value_get (value->hoffset, 0);
+ shadow->dy = _gtk_css_number_value_get (value->voffset, 0);
+ shadow->spread = _gtk_css_number_value_get (value->spread, 0);
+ shadow->radius = _gtk_css_number_value_get (value->radius, 0);
+}
+
static gboolean
has_empty_clip (cairo_t *cr)
{