aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-02-07 12:47:49 +0100
committerjaseg <git@jaseg.de>2021-02-07 12:47:49 +0100
commit4a967682d48ed16db75f787976e99cd97df28356 (patch)
tree14d462370b9c4fe122ecd5f4146b816054b8c046 /svg-flatten/src
parent79db2628583f7423d89a9e1892867106c8bf7a9a (diff)
downloadgerbolyze-4a967682d48ed16db75f787976e99cd97df28356.tar.gz
gerbolyze-4a967682d48ed16db75f787976e99cd97df28356.tar.bz2
gerbolyze-4a967682d48ed16db75f787976e99cd97df28356.zip
Make inital test run on debian, ubuntu, arch, fedora
Diffstat (limited to 'svg-flatten/src')
-rw-r--r--svg-flatten/src/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/svg-flatten/src/main.cpp b/svg-flatten/src/main.cpp
index e120a9c..3427373 100644
--- a/svg-flatten/src/main.cpp
+++ b/svg-flatten/src/main.cpp
@@ -168,7 +168,7 @@ int main(int argc, char **argv) {
precision = atoi(args["precision"]);
}
- string fmt = args["ofmt"] ? args["ofmt"] : "gerber";
+ string fmt = args["ofmt"] ? args["ofmt"].as<string>() : "gerber";
transform(fmt.begin(), fmt.end(), fmt.begin(), [](unsigned char c){ return std::tolower(c); }); /* c++ yeah */
string sexp_layer = args["sexp_layer"] ? args["sexp_layer"].as<string>() : "auto";
@@ -179,8 +179,8 @@ int main(int argc, char **argv) {
PolygonSink *flattener = nullptr;
PolygonSink *dilater = nullptr;
if (fmt == "svg") {
- string dark_color = args["svg_dark_color"] ? args["svg_dark_color"] : "#000000";
- string clear_color = args["svg_clear_color"] ? args["svg_clear_color"] : "#ffffff";
+ string dark_color = args["svg_dark_color"] ? args["svg_dark_color"].as<string>() : "#000000";
+ string clear_color = args["svg_clear_color"] ? args["svg_clear_color"].as<string>() : "#ffffff";
sink = new SimpleSVGOutput(*out_f, only_polys, precision, dark_color, clear_color);
} else if (fmt == "gbr" || fmt == "grb" || fmt == "gerber") {
@@ -232,7 +232,7 @@ int main(int argc, char **argv) {
sel.layers = &gerbolyze::kicad_default_layers;
}
- string vectorizer = args["vectorizer"] ? args["vectorizer"] : "poisson-disc";
+ string vectorizer = args["vectorizer"] ? args["vectorizer"].as<string>() : "poisson-disc";
/* Check argument */
ImageVectorizer *vec = makeVectorizer(vectorizer);
if (!vec) {
@@ -408,7 +408,7 @@ int main(int argc, char **argv) {
}
}
- VectorizerSelectorizer vec_sel(vectorizer, args["vectorizer_map"] ? args["vectorizer_map"] : "");
+ VectorizerSelectorizer vec_sel(vectorizer, args["vectorizer_map"] ? args["vectorizer_map"].as<string>() : "");
RenderSettings rset {
min_feature_size,
vec_sel,