aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-06-04 23:35:26 +0200
committerjaseg <git@jaseg.de>2021-06-04 23:35:26 +0200
commit3ef3f0223e9662f6c3cc6d213afcd74944399f6b (patch)
tree2c92c59842f5ebb23c7a329b0fcfed1c1a338535 /svg-flatten/src
parenta26c04873ef21c11d783e28256d72b53ad7330cc (diff)
downloadgerbolyze-3ef3f0223e9662f6c3cc6d213afcd74944399f6b.tar.gz
gerbolyze-3ef3f0223e9662f6c3cc6d213afcd74944399f6b.tar.bz2
gerbolyze-3ef3f0223e9662f6c3cc6d213afcd74944399f6b.zip
Enable (shitty) contour simplification
I think my implementation of this algorithm is broken. It does something, but the output looks bad.
Diffstat (limited to 'svg-flatten/src')
-rw-r--r--svg-flatten/src/vec_core.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/svg-flatten/src/vec_core.cpp b/svg-flatten/src/vec_core.cpp
index 1716380..2819965 100644
--- a/svg-flatten/src/vec_core.cpp
+++ b/svg-flatten/src/vec_core.cpp
@@ -436,7 +436,7 @@ void gerbolyze::OpenCVContoursVectorizer::vectorize_image(xform2d &mat, const pu
draw_bg_rect(local_xf, width, height, clip_path, sink);
img->binarize();
- nopencv::find_contours(*img, [&sink, &local_xf, &clip_path, off_x, off_y, scale_x, scale_y](Polygon_i& poly, nopencv::ContourPolarity pol) {
+ nopencv::find_contours(*img, nopencv::simplify_contours_teh_chin([&sink, &local_xf, &clip_path, off_x, off_y, scale_x, scale_y](Polygon_i& poly, nopencv::ContourPolarity pol) {
if (pol == nopencv::CP_HOLE) {
std::reverse(poly.begin(), poly.end());
@@ -476,7 +476,7 @@ void gerbolyze::OpenCVContoursVectorizer::vectorize_image(xform2d &mat, const pu
});
sink << out;
}
- });
+ }));
}
gerbolyze::VectorizerSelectorizer::VectorizerSelectorizer(const string default_vectorizer, const string defs)