aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-01-28 23:15:36 +0100
committerjaseg <git@jaseg.de>2021-01-28 23:15:36 +0100
commit6d1a7750c5fa0d78c7fe35a7b7bff8934b86089d (patch)
tree76dcc0361419ccbbffa5900c2d18ee2956124a5f /include
parentf65cd52304a9a57118d82e527469839d5663e7ba (diff)
downloadgerbolyze-6d1a7750c5fa0d78c7fe35a7b7bff8934b86089d.tar.gz
gerbolyze-6d1a7750c5fa0d78c7fe35a7b7bff8934b86089d.tar.bz2
gerbolyze-6d1a7750c5fa0d78c7fe35a7b7bff8934b86089d.zip
Per-image vectorizer selection works
Diffstat (limited to 'include')
-rw-r--r--include/gerbolyze.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/gerbolyze.hpp b/include/gerbolyze.hpp
index 01d089a..1d4f9bd 100644
--- a/include/gerbolyze.hpp
+++ b/include/gerbolyze.hpp
@@ -93,15 +93,27 @@ namespace gerbolyze {
class ImageVectorizer {
public:
+ virtual ~ImageVectorizer() {};
virtual void vectorize_image(cairo_t *cr, const pugi::xml_node &node, ClipperLib::Paths &clip_path, cairo_matrix_t &viewport_matrix, PolygonSink &sink, double min_feature_size_px) = 0;
};
ImageVectorizer *makeVectorizer(const std::string &name);
+ class VectorizerSelectorizer {
+ public:
+ VectorizerSelectorizer(const std::string default_vectorizer="dev-null", const std::string defs="");
+
+ ImageVectorizer *select(const pugi::xml_node &img);
+
+ private:
+ std::string m_default;
+ std::map<std::string, std::string> m_map;
+ };
+
class RenderSettings {
public:
double m_minimum_feature_size_mm = 0.1;
- ImageVectorizer *m_vec = nullptr;
+ VectorizerSelectorizer &m_vec_sel;
};
class SVGDocument {