svg-flatten: remove debug prints

This commit is contained in:
jaseg 2022-06-19 21:26:35 +02:00
parent 446c5e5901
commit f58cca0ba6
2 changed files with 0 additions and 13 deletions

View file

@ -56,7 +56,6 @@ bool gerbolyze::SVGDocument::load(istream &in) {
/* Set up the document's viewport transform */
istringstream vb_stream(root_elem.attribute("viewBox").value());
vb_stream >> vb_x >> vb_y >> vb_w >> vb_h;
cerr << "SVG document viewbox: origin=" << vb_x << "," << vb_y << ", size=" << vb_w << "," << vb_h << endl;
page_w = usvg_double_attr(root_elem, "width");
page_h = usvg_double_attr(root_elem, "height");
@ -315,14 +314,6 @@ void gerbolyze::SVGDocument::export_svg_path(RenderContext &ctx, const pugi::xml
} else {
PolyTreeToPaths(ptree_fill, fill_paths);
cerr << "clip paths" << endl;
for (auto &p : fill_paths) {
cerr << " ";
for (auto &pt : p) {
cerr << "<" << pt.X << "," << pt.Y << "> ";
}
cerr << endl;
}
RenderContext local_ctx(ctx, xform2d(), fill_paths, true);
pattern->tile(local_ctx);
}

View file

@ -27,7 +27,6 @@ using namespace std;
gerbolyze::Pattern::Pattern(const pugi::xml_node &node, SVGDocument &doc) : _node(node), doc(&doc) {
/* Read pattern attributes from SVG node */
cerr << "creating pattern for node with id \"" << node.attribute("id").value() << "\"" << endl;
x = usvg_double_attr(node, "x");
y = usvg_double_attr(node, "y");
w = usvg_double_attr(node, "width");
@ -69,7 +68,6 @@ void gerbolyze::Pattern::tile (gerbolyze::RenderContext &ctx) {
double by = clip_bounds.top / clipper_scale;
double bw = (clip_bounds.right - clip_bounds.left) / clipper_scale;
double bh = (clip_bounds.bottom - clip_bounds.top) / clipper_scale;
cerr << "clip bounds " << bx << ", " << by << "w=" << bw <<" h=" << bh << endl;
d2p clip_p0 = patternTransform_inv.doc2phys(d2p{bx, by});
d2p clip_p1 = patternTransform_inv.doc2phys(d2p{bx+bw, by+bh});
@ -93,12 +91,10 @@ void gerbolyze::Pattern::tile (gerbolyze::RenderContext &ctx) {
for (double inst_off_x = fmod(inst_x, inst_w) - 2*inst_w;
inst_off_x < bx + bw + 2*inst_w;
inst_off_x += inst_w) {
cerr << "inst_off_x " << inst_off_x << endl;
for (double inst_off_y = fmod(inst_y, inst_h) - 2*inst_h;
inst_off_y < by + bh + 2*inst_h;
inst_off_y += inst_h) {
cerr << " inst_off_y " << inst_off_y << endl;
xform2d elem_xf;
/* Change into this individual tile's coordinate system */