aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/vec_core.h
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-08-18 17:29:57 +0200
committerjaseg <git@jaseg.de>2021-08-18 17:29:57 +0200
commitaaade1b168b3780a9c2ed1387165086ede33bc54 (patch)
treef379dc1568a6c08e4ccfa68c2572773183dfe5d1 /svg-flatten/src/vec_core.h
parentaad0ae0215719faaf74445d5833921cb07982012 (diff)
downloadgerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.tar.gz
gerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.tar.bz2
gerbolyze-aaade1b168b3780a9c2ed1387165086ede33bc54.zip
Collect various rendering params into new RenderContext object
Diffstat (limited to 'svg-flatten/src/vec_core.h')
-rw-r--r--svg-flatten/src/vec_core.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/svg-flatten/src/vec_core.h b/svg-flatten/src/vec_core.h
index ce25807..024d98f 100644
--- a/svg-flatten/src/vec_core.h
+++ b/svg-flatten/src/vec_core.h
@@ -29,7 +29,7 @@ namespace gerbolyze {
public:
VoronoiVectorizer(grid_type grid, bool relax=true) : m_relax(relax), m_grid_type(grid) {}
- virtual void vectorize_image(xform2d &mat, const pugi::xml_node &node, ClipperLib::Paths &clip_path, PolygonSink &sink, double min_feature_size_px);
+ virtual void vectorize_image(RenderContext &ctx, const pugi::xml_node &node, double min_feature_size_px);
private:
double m_relax;
grid_type m_grid_type;
@@ -39,18 +39,18 @@ namespace gerbolyze {
public:
OpenCVContoursVectorizer() {}
- virtual void vectorize_image(xform2d &mat, const pugi::xml_node &node, ClipperLib::Paths &clip_path, PolygonSink &sink, double min_feature_size_px);
+ virtual void vectorize_image(RenderContext &ctx, const pugi::xml_node &node, double min_feature_size_px);
};
class DevNullVectorizer : public ImageVectorizer {
public:
DevNullVectorizer() {}
- virtual void vectorize_image(xform2d &, const pugi::xml_node &, ClipperLib::Paths &, PolygonSink &, double) {}
+ virtual void vectorize_image(RenderContext &, const pugi::xml_node &, double) {}
};
void parse_img_meta(const pugi::xml_node &node, double &x, double &y, double &width, double &height);
- void draw_bg_rect(xform2d &mat, double width, double height, ClipperLib::Paths &clip_path, PolygonSink &sink);
+ void draw_bg_rect(RenderContext &ctx, double width, double height);
void handle_aspect_ratio(std::string spec, double &scale_x, double &scale_y, double &off_x, double &off_y, double cols, double rows);
}