1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//! `vsvg` is a library crate to manipulate vector graphics, with a focus on SVG and
//! pen-plotter applications. It's inspired upon [`vpype`](https://github.com/abey79/vpype), the
//! Swiss-Army-knife command-line tool for plotter vector graphics.

#![warn(clippy::pedantic)]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::missing_errors_doc)]

mod angle;
mod catmull_rom;
mod color;
mod crop;
mod document;
mod layer;
mod length;
mod optimization;
mod page_size;
mod path;
mod path_index;
mod stats;
mod svg;
mod test_utils;
mod traits;
#[cfg(feature = "egui")]
pub mod ui;
mod unit;
#[cfg(feature = "whiskers-widgets")]
pub mod widgets;

pub use angle::*;
pub use catmull_rom::*;
pub use color::*;
pub use crop::*;
pub use document::*;
pub use layer::*;
pub use length::*;
#[allow(unused_imports)]
pub use optimization::*;
pub use page_size::*;
pub use path::*;
pub use path_index::*;
pub use stats::*;
pub use svg::*;
pub use traits::*;
pub use unit::*;

/// Export of core dependencies.
pub mod exports {
    #[cfg(feature = "egui")]
    pub use ::egui;
    #[cfg(feature = "geo")]
    pub use ::geo;
    pub use ::kurbo;
    #[cfg(feature = "puffin")]
    pub use ::puffin;
    pub use ::serde;
    pub use ::usvg;
}

#[macro_export]
macro_rules! trace_function {
    () => {
        #[cfg(feature = "puffin")]
        $crate::exports::puffin::profile_function!();
    };
}

#[macro_export]
macro_rules! trace_scope {
    ($id:expr) => {
        #[cfg(feature = "puffin")]
        $crate::exports::puffin::profile_scope!($id);
    };
    ($id:expr, $data:expr) => {
        #[cfg(feature = "puffin")]
        $crate::exports::puffin::profile_scope!($id, $data);
    };
}