[librsvg] Update to cairo-rs changes
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Update to cairo-rs changes
- Date: Mon, 31 Jul 2017 18:08:54 +0000 (UTC)
commit 89e84d9788e100784dc7f9a9f32286a545b95820
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Jul 31 12:11:17 2017 -0500
Update to cairo-rs changes
rust/Cargo.lock | 92 ++++++--------------------------------
rust/Cargo.toml | 4 +-
rust/src/bbox.rs | 4 +-
rust/src/gradient.rs | 3 +-
rust/src/marker.rs | 3 +-
rust/src/parse_transform.lalrpop | 3 +-
rust/src/pattern.rs | 15 +++---
rust/src/structure.rs | 3 +-
rust/src/transform.rs | 4 +-
9 files changed, 36 insertions(+), 95 deletions(-)
---
diff --git a/rust/Cargo.lock b/rust/Cargo.lock
index b8efe01..324589d 100644
--- a/rust/Cargo.lock
+++ b/rust/Cargo.lock
@@ -3,7 +3,7 @@ name = "rsvg_internals"
version = "0.0.1"
dependencies = [
"bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "cairo 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cairo-rs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"cairo-sys-rs 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cssparser 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)",
"downcast-rs 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -80,12 +80,20 @@ version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
-name = "cairo"
-version = "0.0.4"
+name = "c_vec"
+version = "1.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+
+[[package]]
+name = "cairo-rs"
+version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
+ "c_vec 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "cairo-sys-rs 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
+ "glib 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.28 (registry+https://github.com/rust-lang/crates.io-index)",
- "num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
+ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -310,72 +318,6 @@ dependencies = [
]
[[package]]
-name = "num"
-version = "0.1.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-complex 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-rational 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "num-bigint"
-version = "0.1.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "num-complex"
-version = "0.1.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "num-integer"
-version = "0.1.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "num-iter"
-version = "0.1.34"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "num-rational"
-version = "0.1.39"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "num-traits"
-version = "0.1.40"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
name = "petgraph"
version = "0.1.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -602,7 +544,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" =
"aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" =
"1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" =
"4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
-"checksum cairo 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" =
"93611bc95d77e5486187a8c148f9d9317b2cdb759694676670a087e636dc8658"
+"checksum c_vec 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" =
"6237ac5a4b1e81c213c24c6437964c61e646df910a914b4ab1487b46df20bd13"
+"checksum cairo-rs 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" =
"0180a8b65dc13e78479c6a47c4d5f094d64dc34465a9433c6daef9ae2fbfb3ee"
"checksum cairo-sys-rs 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" =
"a2414b86c20c40dfb56a98b1dbca05bde56411f488d268c4289a86df1b648c61"
"checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" =
"78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299"
"checksum cssparser 0.18.2 (registry+https://github.com/rust-lang/crates.io-index)" =
"c89e2d77451da8a55f1f2fcaf7eb86c32da9296890c6a474c7e4047f2429b2f4"
@@ -628,13 +571,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" =
"100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376"
"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" =
"d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
"checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" =
"1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4"
-"checksum num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" =
"a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525"
-"checksum num-bigint 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" =
"8fd0f8dbb4c0960998958a796281d88c16fbe68d87b1baa6f31e2979e81fd0bd"
-"checksum num-complex 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" =
"503e668405c5492d67cf662a81e05be40efe2e6bcf10f7794a07bd9865e704e6"
-"checksum num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" =
"d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba"
-"checksum num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" =
"7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01"
-"checksum num-rational 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" =
"288629c76fac4b33556f4b7ab57ba21ae202da65ba8b77466e6d598e31990790"
-"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" =
"99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0"
"checksum petgraph 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" =
"bfd1de18b0a5f1777162e5b61aaf498032467d5409ab4ca6dbd03049f5708de1"
"checksum phf 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" =
"cb325642290f28ee14d8c6201159949a872f220c62af6e110a56ea914fbe42fc"
"checksum phf_codegen 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" =
"d62594c0bb54c464f633175d502038177e90309daf2e0158be42ed5f023ce88f"
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
index 8dd6f3a..6de057f 100644
--- a/rust/Cargo.toml
+++ b/rust/Cargo.toml
@@ -9,8 +9,8 @@ libc = "0.2"
bitflags = "^0.9.1"
glib = "^0.1.3"
glib-sys = "^0.3.4"
-cairo = ""
-cairo-sys-rs = ""
+cairo-rs = "^0.1.3"
+cairo-sys-rs = "^0.3.4"
downcast-rs = "^1.0.0"
regex = "^0.2.1"
lalrpop-util = "^0.12.5"
diff --git a/rust/src/bbox.rs b/rust/src/bbox.rs
index eb9931f..a1ee245 100644
--- a/rust/src/bbox.rs
+++ b/rust/src/bbox.rs
@@ -2,8 +2,8 @@ use ::cairo;
use ::glib_sys;
use ::glib;
-use self::cairo::MatrixTrait;
-use self::glib::translate::*;
+use glib::translate::*;
+use cairo::MatrixTrait;
/* Keep this in sync with ../../rsvg-private.h:RsvgBbox */
#[repr(C)]
diff --git a/rust/src/gradient.rs b/rust/src/gradient.rs
index 2eac35e..aac0ea2 100644
--- a/rust/src/gradient.rs
+++ b/rust/src/gradient.rs
@@ -5,6 +5,8 @@ use ::libc;
use std::cell::RefCell;
+use cairo::MatrixTrait;
+
use bbox::*;
use drawing_ctx;
use drawing_ctx::RsvgDrawingCtx;
@@ -17,7 +19,6 @@ use property_bag::*;
use stop::*;
use util::*;
-use self::cairo::MatrixTrait;
#[derive(Copy, Clone)]
pub struct ColorStop {
diff --git a/rust/src/marker.rs b/rust/src/marker.rs
index 9b88409..36eddb6 100644
--- a/rust/src/marker.rs
+++ b/rust/src/marker.rs
@@ -1,5 +1,4 @@
use ::cairo;
-use ::cairo::MatrixTrait;
use ::glib::translate::*;
use ::libc;
@@ -7,6 +6,8 @@ use std::cell::Cell;
use std::f64::consts::*;
use std::str::FromStr;
+use cairo::MatrixTrait;
+
use aspect_ratio::*;
use drawing_ctx;
use drawing_ctx::RsvgDrawingCtx;
diff --git a/rust/src/parse_transform.lalrpop b/rust/src/parse_transform.lalrpop
index 0747218..a8e119f 100644
--- a/rust/src/parse_transform.lalrpop
+++ b/rust/src/parse_transform.lalrpop
@@ -8,7 +8,8 @@ use std::f64::consts::*;
use std::str::FromStr;
use ::cairo;
-use ::cairo::MatrixTrait;
+use cairo::Matrix;
+use cairo::MatrixTrait;
#[LALR]
grammar;
diff --git a/rust/src/pattern.rs b/rust/src/pattern.rs
index 9cba565..f8b7486 100644
--- a/rust/src/pattern.rs
+++ b/rust/src/pattern.rs
@@ -1,8 +1,4 @@
use ::cairo;
-use ::cairo::MatrixTrait;
-use ::cairo::enums::*;
-use ::cairo::SurfacePattern;
-use ::cairo::Pattern as CairoPattern;
use ::glib_sys;
use ::glib::translate::*;
use ::libc;
@@ -11,6 +7,9 @@ use std::cell::RefCell;
use std::rc::*;
use std::str::FromStr;
+use cairo::MatrixTrait;
+use cairo::Pattern as CairoPattern;
+
use aspect_ratio::*;
use bbox::*;
use drawing_ctx;
@@ -422,7 +421,7 @@ fn set_pattern_on_draw_context (pattern: &Pattern,
let cr_save = drawing_ctx::get_cairo_context (draw_ctx);
drawing_ctx::state_push (draw_ctx);
- let surface = cr_save.get_target ().create_similar (Content::ColorAlpha, pw, ph);
+ let surface = cr_save.get_target ().create_similar (cairo::Content::ColorAlpha, pw, ph);
let cr_pattern = cairo::Context::new (&surface);
@@ -446,14 +445,14 @@ fn set_pattern_on_draw_context (pattern: &Pattern,
// Set the final surface as a Cairo pattern into the Cairo context
- let surface_pattern = SurfacePattern::create (&surface);
- surface_pattern.set_extend (Extend::Repeat);
+ let surface_pattern = cairo::SurfacePattern::create (&surface);
+ surface_pattern.set_extend (cairo::Extend::Repeat);
let mut matrix = affine;
matrix.invert ();
surface_pattern.set_matrix (matrix);
- surface_pattern.set_filter (Filter::Best);
+ surface_pattern.set_filter (cairo::Filter::Best);
cr_save.set_source (&surface_pattern);
diff --git a/rust/src/structure.rs b/rust/src/structure.rs
index e54d786..0560c79 100644
--- a/rust/src/structure.rs
+++ b/rust/src/structure.rs
@@ -1,4 +1,3 @@
-use ::cairo::MatrixTrait;
use ::glib::translate::*;
use ::libc;
@@ -6,6 +5,8 @@ use std::cell::RefCell;
use std::cell::Cell;
use std::ptr;
+use cairo::MatrixTrait;
+
use aspect_ratio::*;
use drawing_ctx::RsvgDrawingCtx;
use drawing_ctx;
diff --git a/rust/src/transform.rs b/rust/src/transform.rs
index 2e31565..dac98fc 100644
--- a/rust/src/transform.rs
+++ b/rust/src/transform.rs
@@ -1,11 +1,13 @@
use ::cairo;
-use ::cairo::MatrixTrait;
use ::glib::translate::*;
use ::glib_sys;
use ::libc;
use std::f64::consts::*;
+use cairo::Matrix;
+use cairo::MatrixTrait;
+
use parse_transform::*;
use error::*;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]