3 Commits

Author SHA1 Message Date
Chris Tsang
8889cbc7ea Tweaks
Some checks failed
Rust / build (push) Has been cancelled
2024-09-26 12:59:45 +01:00
Wil Carmon
6b379a02ef Update svg.rs (#92) 2024-09-26 12:58:43 +01:00
Wil Carmon
2635d5b874 Update config.rs (#91)
added #[derive(Clone, Debug)]
2024-09-26 12:58:30 +01:00
2 changed files with 7 additions and 0 deletions

View File

@@ -1,23 +1,27 @@
use std::str::FromStr;
use visioncortex::PathSimplifyMode;
#[derive(Debug, Clone)]
pub enum Preset {
Bw,
Poster,
Photo,
}
#[derive(Debug, Clone)]
pub enum ColorMode {
Color,
Binary,
}
#[derive(Debug, Clone)]
pub enum Hierarchical {
Stacked,
Cutout,
}
/// Converter config
#[derive(Debug, Clone)]
pub struct Config {
pub color_mode: ColorMode,
pub hierarchical: Hierarchical,
@@ -32,6 +36,7 @@ pub struct Config {
pub path_precision: Option<u32>,
}
#[derive(Debug, Clone)]
pub(crate) struct ConverterConfig {
pub color_mode: ColorMode,
pub hierarchical: Hierarchical,

View File

@@ -1,6 +1,7 @@
use std::fmt;
use visioncortex::{Color, CompoundPath, PointF64};
#[derive(Debug, Clone)]
pub struct SvgFile {
pub paths: Vec<SvgPath>,
pub width: usize,
@@ -8,6 +9,7 @@ pub struct SvgFile {
pub path_precision: Option<u32>,
}
#[derive(Debug, Clone)]
pub struct SvgPath {
pub path: CompoundPath,
pub color: Color,