drawing_ctx.rs: Put the declaration of RsvgDrawingCtx here

We'll use this file to declare the accessors to an RsvgDrawingCtx, which
are right now implemented in C.
parent 66f73945
pub enum RsvgDrawingCtx {}
extern "C" {
fn rsvg_drawing_ctx_get_view_box_size (draw_ctx: *const RsvgDrawingCtx,
out_x: *mut f64,
out_y: *mut f64);
pub fn get_view_box_size (draw_ctx: *const RsvgDrawingCtx) -> (f64, f64) {
let mut w: f64 = 0.0;
let mut h: f64 = 0.0;
unsafe { rsvg_drawing_ctx_get_view_box_size (draw_ctx, &mut w, &mut h); }
(w, h)
......@@ -26,8 +26,9 @@ pub use length::{
mod drawing_ctx;
mod length;
mod marker;
mod path_builder;
mod path_parser;
mod marker;
mod strtod;
mod length;
......@@ -3,6 +3,7 @@ extern crate cairo;
extern crate cairo_sys;
use path_builder::*;
use drawing_ctx::RsvgDrawingCtx;
#[derive(Debug, PartialEq)]
pub enum Segment {
......@@ -291,8 +292,6 @@ fn angle_from_vector (vx: f64, vy: f64) -> f64 {
pub enum RsvgDrawingCtx {}
extern "C" {
fn rsvg_marker_render (marker_name: *const libc::c_char,
xpos: f64,
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