[librsvg: 4/12] state: add getters for flood properties



commit 1cb0249037e9df788c9fed01f0765319f71533fd
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Apr 21 17:14:51 2018 +0200

    state: add getters for flood properties

 librsvg/rsvg-filter.c |  4 ++--
 librsvg/rsvg-styles.c | 12 ++++++++++++
 librsvg/rsvg-styles.h |  6 ++++++
 3 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/librsvg/rsvg-filter.c b/librsvg/rsvg-filter.c
index 191bad00..abb8cb68 100644
--- a/librsvg/rsvg-filter.c
+++ b/librsvg/rsvg-filter.c
@@ -3538,8 +3538,8 @@ rsvg_filter_primitive_flood_render (RsvgNode *node, RsvgFilterPrimitive *primiti
 
     state = rsvg_node_get_state (node);
 
-    guint32 color = state->flood_color;
-    guint8 opacity = state->flood_opacity;
+    guint32 color = rsvg_state_get_flood_color (state);
+    guint8 opacity = rsvg_state_get_flood_opacity (state);
 
     boundarys = rsvg_filter_primitive_get_bounds (primitive, ctx);
 
diff --git a/librsvg/rsvg-styles.c b/librsvg/rsvg-styles.c
index d5c860b5..d5bbe083 100644
--- a/librsvg/rsvg-styles.c
+++ b/librsvg/rsvg-styles.c
@@ -1146,6 +1146,18 @@ rsvg_state_get_fill_opacity (RsvgState *state)
     return state->fill_opacity;
 }
 
+guint32
+rsvg_state_get_flood_color (RsvgState *state)
+{
+    return state->flood_color;
+}
+
+guint8
+rsvg_state_get_flood_opacity (RsvgState *state)
+{
+    return state->flood_opacity;
+}
+
 cairo_operator_t
 rsvg_state_get_comp_op (RsvgState *state)
 {
diff --git a/librsvg/rsvg-styles.h b/librsvg/rsvg-styles.h
index 7e426203..003f3425 100644
--- a/librsvg/rsvg-styles.h
+++ b/librsvg/rsvg-styles.h
@@ -160,6 +160,12 @@ RsvgPaintServer *rsvg_state_get_fill (RsvgState *state);
 G_GNUC_INTERNAL
 guint8 rsvg_state_get_fill_opacity (RsvgState *state);
 
+G_GNUC_INTERNAL
+guint32 rsvg_state_get_flood_color (RsvgState *state);
+
+G_GNUC_INTERNAL
+guint8 rsvg_state_get_flood_opacity (RsvgState *state);
+
 G_GNUC_INTERNAL
 cairo_operator_t rsvg_state_get_comp_op (RsvgState *state);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]