aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/main.cpp
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/src/main.cpp
parent6193fa151eb503a769e9affd8da330cd50895be7 (diff)
downloadgerbolyze-61887e9ee1a108c26cdd4b2d67fc4095d62b6e9d.tar.gz
gerbolyze-61887e9ee1a108c26cdd4b2d67fc4095d62b6e9d.tar.bz2
gerbolyze-61887e9ee1a108c26cdd4b2d67fc4095d62b6e9d.zip
Add & fix vectorizer tests
Diffstat (limited to 'svg-flatten/src/main.cpp')
-rw-r--r--svg-flatten/src/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/svg-flatten/src/main.cpp b/svg-flatten/src/main.cpp
index 3093d6a..1fce67b 100644
--- a/svg-flatten/src/main.cpp
+++ b/svg-flatten/src/main.cpp
@@ -34,14 +34,17 @@ int main(int argc, char **argv) {
"Number of decimal places use for exported coordinates (gerber: 1-9, SVG: 0-*)",
1},
{"svg_clear_color", {"--clear-color"},
- "SVG color to use for \"clear\" areas (default: white)",
+ "SVG color to use for \"clear\" areas (SVG output only; default: white)",
1},
{"svg_dark_color", {"--dark-color"},
- "SVG color to use for \"dark\" areas (default: black)",
+ "SVG color to use for \"dark\" areas (SVG output only; default: black)",
1},
{"flip_gerber_polarity", {"-f", "--flip-gerber-polarity"},
"Flip polarity of all output gerber primitives for --format gerber.",
0},
+ {"flip_svg_color_interpretation", {"-i", "--svg-white-is-gerber-dark"},
+ "Flip polarity of SVG color interpretation. This affects only SVG primitives like paths and NOT embedded bitmaps. With -i: white -> silk there/\"dark\" gerber primitive.",
+ 0},
{"min_feature_size", {"-d", "--trace-space"},
"Minimum feature size of elements in vectorized graphics (trace/space) in mm. Default: 0.1mm.",
1},
@@ -420,11 +423,14 @@ int main(int argc, char **argv) {
}
VectorizerSelectorizer vec_sel(vectorizer, args["vectorizer_map"] ? args["vectorizer_map"].as<string>() : "");
+ bool flip_svg_colors = args["flip_svg_color_interpretation"];
+
RenderSettings rset {
min_feature_size,
curve_tolerance,
vec_sel,
outline_mode,
+ flip_svg_colors,
};
SVGDocument doc;