aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/include
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-06-04 23:28:36 +0200
committerjaseg <git@jaseg.de>2021-06-04 23:28:36 +0200
commit61887e9ee1a108c26cdd4b2d67fc4095d62b6e9d (patch)
tree6773b748eaf4983ae20c5196e8b20dfa370c0b0b /svg-flatten/include
parent6193fa151eb503a769e9affd8da330cd50895be7 (diff)
downloadgerbolyze-61887e9ee1a108c26cdd4b2d67fc4095d62b6e9d.tar.gz
gerbolyze-61887e9ee1a108c26cdd4b2d67fc4095d62b6e9d.tar.bz2
gerbolyze-61887e9ee1a108c26cdd4b2d67fc4095d62b6e9d.zip
Add & fix vectorizer tests
Diffstat (limited to 'svg-flatten/include')
-rw-r--r--svg-flatten/include/geom2d.hpp8
-rw-r--r--svg-flatten/include/gerbolyze.hpp1
2 files changed, 5 insertions, 4 deletions
diff --git a/svg-flatten/include/geom2d.hpp b/svg-flatten/include/geom2d.hpp
index 82dbfb5..9f83754 100644
--- a/svg-flatten/include/geom2d.hpp
+++ b/svg-flatten/include/geom2d.hpp
@@ -72,14 +72,14 @@ namespace gerbolyze {
}
xform2d &translate(double x, double y) {
- x0 += x*xx + y*xy;
- y0 += y*yy + x*yx;
+ xform2d xf(1, 0, 0, 1, x, y);
+ transform(xf);
return *this;
}
xform2d &scale(double x, double y) {
- xx *= x; yx *= y; xy *= x;
- yy *= y; x0 *= x; y0 *= y;
+ xform2d xf(x, 0, 0, y);
+ transform(xf);
return *this;
}
diff --git a/svg-flatten/include/gerbolyze.hpp b/svg-flatten/include/gerbolyze.hpp
index a30d7eb..9b05bdb 100644
--- a/svg-flatten/include/gerbolyze.hpp
+++ b/svg-flatten/include/gerbolyze.hpp
@@ -166,6 +166,7 @@ namespace gerbolyze {
double curve_tolerance_mm;
VectorizerSelectorizer &m_vec_sel;
bool outline_mode = false;
+ bool flip_color_interpretation = false;
};
class SVGDocument {