StopOpacity: Rename to RsvgOpacitySpec

To be consistent with RsvgColorSpec
parent 32477f56
...@@ -298,17 +298,17 @@ rsvg_stop_set_atts (RsvgNode *node, gpointer impl, RsvgHandle *handle, RsvgPrope ...@@ -298,17 +298,17 @@ rsvg_stop_set_atts (RsvgNode *node, gpointer impl, RsvgHandle *handle, RsvgPrope
if (state->has_stop_opacity) { if (state->has_stop_opacity) {
switch (state->stop_opacity.kind) { switch (state->stop_opacity.kind) {
case STOP_OPACITY_SPECIFIED: case RSVG_OPACITY_SPECIFIED:
opacity = state->stop_opacity.opacity; opacity = state->stop_opacity.opacity;
break; break;
case STOP_OPACITY_INHERIT: case RSVG_OPACITY_INHERIT:
switch (inherited_state->stop_opacity.kind) { switch (inherited_state->stop_opacity.kind) {
case STOP_OPACITY_SPECIFIED: case RSVG_OPACITY_SPECIFIED:
opacity = inherited_state->stop_opacity.opacity; opacity = inherited_state->stop_opacity.opacity;
break; break;
case STOP_OPACITY_INHERIT: case RSVG_OPACITY_INHERIT:
opacity = 0xff; opacity = 0xff;
break; break;
......
...@@ -113,7 +113,7 @@ rsvg_state_init (RsvgState * state) ...@@ -113,7 +113,7 @@ rsvg_state_init (RsvgState * state)
* *
*/ */
state->stop_color.kind = RSVG_CSS_COLOR_SPEC_INHERIT; state->stop_color.kind = RSVG_CSS_COLOR_SPEC_INHERIT;
state->stop_opacity.kind = STOP_OPACITY_INHERIT; state->stop_opacity.kind = RSVG_OPACITY_INHERIT;
state->fill_rule = CAIRO_FILL_RULE_WINDING; state->fill_rule = CAIRO_FILL_RULE_WINDING;
state->clip_rule = CAIRO_FILL_RULE_WINDING; state->clip_rule = CAIRO_FILL_RULE_WINDING;
...@@ -352,7 +352,7 @@ rsvg_state_inherit_run (RsvgState * dst, const RsvgState * src, ...@@ -352,7 +352,7 @@ rsvg_state_inherit_run (RsvgState * dst, const RsvgState * src,
} }
} }
if (function (dst->has_stop_opacity, src->has_stop_opacity)) { if (function (dst->has_stop_opacity, src->has_stop_opacity)) {
if (dst->stop_opacity.kind == STOP_OPACITY_INHERIT) { if (dst->stop_opacity.kind == RSVG_OPACITY_INHERIT) {
dst->stop_opacity = src->stop_opacity; dst->stop_opacity = src->stop_opacity;
} }
} }
...@@ -854,9 +854,9 @@ rsvg_parse_style_pair (RsvgState * state, ...@@ -854,9 +854,9 @@ rsvg_parse_style_pair (RsvgState * state,
} else if (g_str_equal (name, "stop-opacity")) { } else if (g_str_equal (name, "stop-opacity")) {
state->has_stop_opacity = TRUE; state->has_stop_opacity = TRUE;
if (g_str_equal (value, "inherit")) { if (g_str_equal (value, "inherit")) {
state->stop_opacity.kind = STOP_OPACITY_INHERIT; state->stop_opacity.kind = RSVG_OPACITY_INHERIT;
} else { } else {
state->stop_opacity.kind = STOP_OPACITY_SPECIFIED; state->stop_opacity.kind = RSVG_OPACITY_SPECIFIED;
state->stop_opacity.opacity = rsvg_css_parse_opacity (value); state->stop_opacity.opacity = rsvg_css_parse_opacity (value);
} }
} else if (g_str_equal (name, "marker-start")) { } else if (g_str_equal (name, "marker-start")) {
......
...@@ -73,14 +73,14 @@ struct _RsvgVpathDash { ...@@ -73,14 +73,14 @@ struct _RsvgVpathDash {
}; };
typedef enum { typedef enum {
STOP_OPACITY_INHERIT, RSVG_OPACITY_INHERIT,
STOP_OPACITY_SPECIFIED RSVG_OPACITY_SPECIFIED
} StopOpacityKind; } RsvgOpacityKind;
typedef struct { typedef struct {
StopOpacityKind kind; RsvgOpacityKind kind;
guint8 opacity; /* 0..255; only valid if kind == STOP_OPACITY_SPECIFIED */ guint8 opacity; /* 0..255; only valid if kind == RSVG_OPACITY_SPECIFIED */
} StopOpacity; } RsvgOpacitySpec;
/* end libart theft... */ /* end libart theft... */
...@@ -154,7 +154,7 @@ struct _RsvgState { ...@@ -154,7 +154,7 @@ struct _RsvgState {
RsvgCssColorSpec stop_color; RsvgCssColorSpec stop_color;
gboolean has_stop_color; gboolean has_stop_color;
StopOpacity stop_opacity; RsvgOpacitySpec stop_opacity;
gboolean has_stop_opacity; gboolean has_stop_opacity;
gboolean visible; gboolean visible;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment