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
if (state->has_stop_opacity) {
switch (state->stop_opacity.kind) {
case STOP_OPACITY_SPECIFIED:
case RSVG_OPACITY_SPECIFIED:
opacity = state->stop_opacity.opacity;
break;
case STOP_OPACITY_INHERIT:
case RSVG_OPACITY_INHERIT:
switch (inherited_state->stop_opacity.kind) {
case STOP_OPACITY_SPECIFIED:
case RSVG_OPACITY_SPECIFIED:
opacity = inherited_state->stop_opacity.opacity;
break;
case STOP_OPACITY_INHERIT:
case RSVG_OPACITY_INHERIT:
opacity = 0xff;
break;
......
......@@ -113,7 +113,7 @@ rsvg_state_init (RsvgState * state)
*
*/
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->clip_rule = CAIRO_FILL_RULE_WINDING;
......@@ -352,7 +352,7 @@ rsvg_state_inherit_run (RsvgState * dst, const RsvgState * src,
}
}
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;
}
}
......@@ -854,9 +854,9 @@ rsvg_parse_style_pair (RsvgState * state,
} else if (g_str_equal (name, "stop-opacity")) {
state->has_stop_opacity = TRUE;
if (g_str_equal (value, "inherit")) {
state->stop_opacity.kind = STOP_OPACITY_INHERIT;
state->stop_opacity.kind = RSVG_OPACITY_INHERIT;
} else {
state->stop_opacity.kind = STOP_OPACITY_SPECIFIED;
state->stop_opacity.kind = RSVG_OPACITY_SPECIFIED;
state->stop_opacity.opacity = rsvg_css_parse_opacity (value);
}
} else if (g_str_equal (name, "marker-start")) {
......
......@@ -73,14 +73,14 @@ struct _RsvgVpathDash {
};
typedef enum {
STOP_OPACITY_INHERIT,
STOP_OPACITY_SPECIFIED
} StopOpacityKind;
RSVG_OPACITY_INHERIT,
RSVG_OPACITY_SPECIFIED
} RsvgOpacityKind;
typedef struct {
StopOpacityKind kind;
guint8 opacity; /* 0..255; only valid if kind == STOP_OPACITY_SPECIFIED */
} StopOpacity;
RsvgOpacityKind kind;
guint8 opacity; /* 0..255; only valid if kind == RSVG_OPACITY_SPECIFIED */
} RsvgOpacitySpec;
/* end libart theft... */
......@@ -154,7 +154,7 @@ struct _RsvgState {
RsvgCssColorSpec stop_color;
gboolean has_stop_color;
StopOpacity stop_opacity;
RsvgOpacitySpec stop_opacity;
gboolean has_stop_opacity;
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