mirror of
https://github.com/visioncortex/vtracer.git
synced 2025-12-06 17:15:41 -08:00
Compare commits
3 Commits
webapp.202
...
8889cbc7ea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8889cbc7ea | ||
|
|
6b379a02ef | ||
|
|
2635d5b874 |
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user