aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/svg_doc.cpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-03-31 16:35:41 +0200
committerjaseg <git@jaseg.de>2023-03-31 16:35:41 +0200
commit4a3a9f15820543790c7e7c4e9bcb6da6fea78033 (patch)
tree98c121a803c0527e955b4b02c53ea31a9641a010 /svg-flatten/src/svg_doc.cpp
parent4127a18e8997f0f94ac97ab3e9eec1010fd1e857 (diff)
downloadgerbolyze-4a3a9f15820543790c7e7c4e9bcb6da6fea78033.tar.gz
gerbolyze-4a3a9f15820543790c7e7c4e9bcb6da6fea78033.tar.bz2
gerbolyze-4a3a9f15820543790c7e7c4e9bcb6da6fea78033.zip
Fix remaining commands for layer rework
Diffstat (limited to 'svg-flatten/src/svg_doc.cpp')
-rw-r--r--svg-flatten/src/svg_doc.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/svg-flatten/src/svg_doc.cpp b/svg-flatten/src/svg_doc.cpp
index afb3a68..d61027b 100644
--- a/svg-flatten/src/svg_doc.cpp
+++ b/svg-flatten/src/svg_doc.cpp
@@ -43,13 +43,13 @@ bool gerbolyze::SVGDocument::load(istream &in, double scale) {
/* Load XML document */
auto res = svg_doc.load(in);
if (!res) {
- cerr << "Cannot parse input file" << endl;
+ cerr << "Error: Cannot parse input file" << endl;
return false;
}
root_elem = svg_doc.child("svg");
if (!root_elem) {
- cerr << "Input file is missing root <svg> element" << endl;
+ cerr << "Error: Input file is missing root <svg> element" << endl;
return false;
}
@@ -207,7 +207,7 @@ void gerbolyze::SVGDocument::export_svg_group(RenderContext &ctx, const pugi::xm
ImageVectorizer *vec = ctx.settings().m_vec_sel.select(node);
if (!vec) {
- cerr << "Cannot resolve vectorizer for node \"" << node.attribute("id").value() << "\"" << endl;
+ cerr << "Warning: Cannot resolve vectorizer for node \"" << node.attribute("id").value() << "\", ignoring." << endl;
continue;
}
@@ -218,7 +218,7 @@ void gerbolyze::SVGDocument::export_svg_group(RenderContext &ctx, const pugi::xm
} else if (name == "defs") {
/* ignore */
} else {
- cerr << " Unexpected child: <" << node.name() << ">" << endl;
+ cerr << "Warning: Ignoring unexpected child: <" << node.name() << ">" << endl;
}
}
}
@@ -266,11 +266,11 @@ void gerbolyze::SVGDocument::export_svg_path(RenderContext &ctx, const pugi::xml
bool has_fill = fill_color;
bool has_stroke = stroke_color && ctx.mat().doc2phys_min(stroke_width) > ctx.settings().stroke_width_cutoff;
- cerr << "processing svg path" << endl;
- cerr << " * " << (has_stroke ? "has stroke" : "no stroke") << " / " << (has_fill ? "has fill" : "no fill") << endl;
- cerr << " * " << fill_paths.size() << " fill paths" << endl;
- cerr << " * " << stroke_closed.size() << " closed strokes" << endl;
- cerr << " * " << stroke_open.size() << " open strokes" << endl;
+ //cerr << "processing svg path" << endl;
+ //cerr << " * " << (has_stroke ? "has stroke" : "no stroke") << " / " << (has_fill ? "has fill" : "no fill") << endl;
+ //cerr << " * " << fill_paths.size() << " fill paths" << endl;
+ //cerr << " * " << stroke_closed.size() << " closed strokes" << endl;
+ //cerr << " * " << stroke_open.size() << " open strokes" << endl;
/* In outline mode, identify drills before applying clip */
if (ctx.settings().outline_mode && has_fill && fill_color != GRB_PATTERN_FILL) {
@@ -570,7 +570,7 @@ void gerbolyze::SVGDocument::render_to_list(const RenderSettings &rset, vector<p
void gerbolyze::SVGDocument::setup_viewport_clip() {
/* Set up view port clip path */
Path vb_path;
- cerr << "setting up viewport clip at " << vb_x << ", " << vb_y << " with size " << vb_w << ", " << vb_h << endl;
+ //cerr << "setting up viewport clip at " << vb_x << ", " << vb_y << " with size " << vb_w << ", " << vb_h << endl;
for (d2p &p : vector<d2p> {
{vb_x, vb_y},
{vb_x+vb_w, vb_y},