diff options
author | Federico Mena Quintero <federico@gnome.org> | 2017-05-30 16:32:01 -0500 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2017-05-30 16:32:01 -0500 |
commit | d644712c05ee2320403ca7cf6e726438355b602e (patch) | |
tree | 6a611dcb9bdb96c3d3b7a78f95dbfb6046d4268d /rsvg-styles.h | |
parent | 37479d8adfee8675a0c308af6bf54260418b21b2 (diff) | |
download | librsvg-d644712c05ee2320403ca7cf6e726438355b602e.tar.gz |
StopOpacity: Turn into a struct; put both the "kind" enum and the actual opacity value here
This makes the stop-opacity property be similar to the stop-color one.
Diffstat (limited to 'rsvg-styles.h')
-rw-r--r-- | rsvg-styles.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/rsvg-styles.h b/rsvg-styles.h index 320d3834..3b62fa34 100644 --- a/rsvg-styles.h +++ b/rsvg-styles.h @@ -73,8 +73,13 @@ struct _RsvgVpathDash { }; typedef enum { - STOP_OPACITY_SPECIFIED, - STOP_OPACITY_INHERIT + STOP_OPACITY_INHERIT, + STOP_OPACITY_SPECIFIED +} StopOpacityKind; + +typedef struct { + StopOpacityKind kind; + guint8 opacity; /* 0..255; only valid if kind == STOP_OPACITY_SPECIFIED */ } StopOpacity; /* end libart theft... */ @@ -146,11 +151,11 @@ struct _RsvgState { guint text_offset; - RsvgCssColorSpec stop_color; /* rgb */ + RsvgCssColorSpec stop_color; gboolean has_stop_color; - gint stop_opacity; /* 0..255 */ + + StopOpacity stop_opacity; gboolean has_stop_opacity; - StopOpacity stop_opacity_mode; gboolean visible; gboolean has_visible; |