outline/vectorizer/mod.rs
1use image::GrayImage;
2
3use crate::OutlineResult;
4
5/// A trait representing an algorithm that can turn a mask into a vector representation.
6pub trait MaskVectorizer {
7 /// Configuration options for the vectorizer.
8 type Options;
9 /// The output type produced by the vectorizer.
10 type Output;
11
12 /// Convert a grayscale mask into a vector representation.
13 fn vectorize(&self, mask: &GrayImage, options: &Self::Options) -> OutlineResult<Self::Output>;
14}
15
16#[cfg(feature = "vectorizer-vtracer")]
17pub mod vtracer;