[librsvg] marker.rs: Move declarations closer to their use
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] marker.rs: Move declarations closer to their use
- Date: Thu, 2 Mar 2017 22:17:14 +0000 (UTC)
commit 57372a4808e7bbc7d85606d7c7de43767550cd28
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Mar 2 12:48:47 2017 -0600
marker.rs: Move declarations closer to their use
rust/src/marker.rs | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/rust/src/marker.rs b/rust/src/marker.rs
index 872831d..a83e7d9 100644
--- a/rust/src/marker.rs
+++ b/rust/src/marker.rs
@@ -573,19 +573,6 @@ fn bisect_angles (incoming: f64, outgoing: f64) -> f64 {
}
}
-extern "C" {
- fn rsvg_get_normalized_stroke_width (draw_ctx: *const RsvgDrawingCtx) -> f64;
-
- fn rsvg_get_start_marker (draw_ctx: *const RsvgDrawingCtx) -> *const libc::c_char;
- fn rsvg_get_middle_marker (draw_ctx: *const RsvgDrawingCtx) -> *const libc::c_char;
- fn rsvg_get_end_marker (draw_ctx: *const RsvgDrawingCtx) -> *const libc::c_char;
-}
-
-enum SubpathState {
- NoSubpath,
- InSubpath
-}
-
fn render_marker_by_name (draw_ctx: *const RsvgDrawingCtx,
marker_name: *const libc::c_char,
xpos: f64,
@@ -657,8 +644,20 @@ fn render_marker_at_end_of_segment (segment: &Segment,
render_marker_by_name (draw_ctx, marker_name, xpos, ypos, orient, line_width);
}
+extern "C" {
+ fn rsvg_get_normalized_stroke_width (draw_ctx: *const RsvgDrawingCtx) -> f64;
+
+ fn rsvg_get_start_marker (draw_ctx: *const RsvgDrawingCtx) -> *const libc::c_char;
+ fn rsvg_get_middle_marker (draw_ctx: *const RsvgDrawingCtx) -> *const libc::c_char;
+ fn rsvg_get_end_marker (draw_ctx: *const RsvgDrawingCtx) -> *const libc::c_char;
+}
+
pub fn render_markers_for_path_builder (builder: &RsvgPathBuilder,
draw_ctx: *const RsvgDrawingCtx) {
+ enum SubpathState {
+ NoSubpath,
+ InSubpath
+ }
let linewidth: f64 = unsafe { rsvg_get_normalized_stroke_width (draw_ctx) };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]