mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-04-07 10:42:04 -07:00
SVG path string numeric precision
This commit is contained in:
@@ -17,6 +17,7 @@ pub struct BinaryImageConverterParams {
|
||||
pub max_iterations: usize,
|
||||
pub splice_threshold: f64,
|
||||
pub filter_speckle: usize,
|
||||
pub path_precision: u32,
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
@@ -80,6 +81,7 @@ impl BinaryImageConverter {
|
||||
self.svg.prepend_path(
|
||||
&paths,
|
||||
&color,
|
||||
Some(self.params.path_precision),
|
||||
);
|
||||
}
|
||||
self.counter += 1;
|
||||
|
||||
@@ -21,6 +21,7 @@ pub struct ColorImageConverterParams {
|
||||
pub filter_speckle: usize,
|
||||
pub color_precision: i32,
|
||||
pub layer_difference: i32,
|
||||
pub path_precision: u32,
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
@@ -137,6 +138,7 @@ impl ColorImageConverter {
|
||||
self.svg.prepend_path(
|
||||
&paths,
|
||||
&cluster.residue_color(),
|
||||
Some(self.params.path_precision),
|
||||
);
|
||||
self.counter += 1;
|
||||
false
|
||||
|
||||
Reference in New Issue
Block a user