[StShadow] Add support for spread radius

The (optional) spread radius allows to make the shadow bigger without
enlarging the blur value. Mozilla supports this parameter for the
-moz-box-shadow property.

https://bugzilla.gnome.org/show_bug.cgi?id=613832
This commit is contained in:
Florian Müllner
2010-03-19 11:34:32 +01:00
parent b71afe55d8
commit 50c453c54d
4 changed files with 28 additions and 7 deletions

View File

@ -2220,6 +2220,7 @@ st_theme_node_get_shadow (StThemeNode *node)
gdouble xoffset = 0.;
gdouble yoffset = 0.;
gdouble blur = 0.;
gdouble spread = 0.;
int n_offsets = 0;
for (term = decl->value; term; term = term->next)
@ -2248,6 +2249,13 @@ st_theme_node_get_shadow (StThemeNode *node)
g_warning ("Negative blur values are "
"not allowed");
blur = value;
break;
case 3:
if (multiplier < 0)
g_warning ("Negative spread values are "
"not allowed");
spread = value;
break;
}
continue;
}
@ -2259,7 +2267,9 @@ st_theme_node_get_shadow (StThemeNode *node)
continue;
}
}
node->shadow = st_shadow_new (&color, xoffset, yoffset, blur);
node->shadow = st_shadow_new (&color,
xoffset, yoffset,
blur, spread);
return node->shadow;
}