[librsvg/rustification] rsvg-styles: New accessor functions for the state struct's markers



commit e0dcaa2519b48b5b180969ffd4d3bf0edce8e43d
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Nov 8 18:58:14 2016 -0600

    rsvg-styles: New accessor functions for the state struct's markers
    
    We will use these from the Rust code to render markers

 rsvg-marker.c |    6 +++---
 rsvg-styles.c |   18 ++++++++++++++++++
 rsvg-styles.h |    7 +++++++
 3 files changed, 28 insertions(+), 3 deletions(-)
---
diff --git a/rsvg-marker.c b/rsvg-marker.c
index 0b5a406..d90d149 100644
--- a/rsvg-marker.c
+++ b/rsvg-marker.c
@@ -224,7 +224,7 @@ rsvg_render_markers (RsvgDrawingCtx *ctx,
     rsvg_rust_render_markers (ctx,
                               builder,
                               linewidth,
-                              state->startMarker,
-                              state->middleMarker,
-                              state->endMarker);
+                              rsvg_state_get_start_marker (state),
+                              rsvg_state_get_middle_marker (state),
+                              rsvg_state_get_end_marker (state));
 }
diff --git a/rsvg-styles.c b/rsvg-styles.c
index de5eb00..24a0e4a 100644
--- a/rsvg-styles.c
+++ b/rsvg-styles.c
@@ -1699,3 +1699,21 @@ rsvg_state_reconstruct (RsvgState * state, RsvgNode * current)
     rsvg_state_reconstruct (state, current->parent);
     rsvg_state_inherit (state, current->state);
 }
+
+const char *
+rsvg_state_get_start_marker (RsvgState *state)
+{
+    return state->startMarker;
+}
+
+const char *
+rsvg_state_get_middle_marker (RsvgState *state)
+{
+    return state->middleMarker;
+}
+    
+const char *
+rsvg_state_get_end_marker (RsvgState *state)
+{
+    return state->endMarker;
+}
diff --git a/rsvg-styles.h b/rsvg-styles.h
index a044d3f..ae46565 100644
--- a/rsvg-styles.h
+++ b/rsvg-styles.h
@@ -243,6 +243,13 @@ void rsvg_state_reinherit_top      (RsvgDrawingCtx * ctx, RsvgState * state, int domi
 G_GNUC_INTERNAL
 void rsvg_state_reconstruct    (RsvgState * state, RsvgNode * current);
 
+G_GNUC_INTERNAL
+const char *rsvg_state_get_start_marker (RsvgState *state);
+G_GNUC_INTERNAL
+const char *rsvg_state_get_middle_marker (RsvgState *state);
+G_GNUC_INTERNAL
+const char *rsvg_state_get_end_marker (RsvgState *state);
+
 G_END_DECLS
 
 #endif                          /* RSVG_STYLES_H */


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