aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/src/out_svg.cpp
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-09-26 15:45:09 +0200
committerjaseg <git@jaseg.de>2021-09-29 16:38:13 +0200
commit8a64621e8c8610a45884df82b46859bc3297d3e3 (patch)
tree4b6265bb01377e16e66dddeee8259f40ea86d562 /svg-flatten/src/out_svg.cpp
parent7eb0b9d7e42a20b85bd7afbfe3d33d9dd5fa5794 (diff)
downloadgerbolyze-8a64621e8c8610a45884df82b46859bc3297d3e3.tar.gz
gerbolyze-8a64621e8c8610a45884df82b46859bc3297d3e3.tar.bz2
gerbolyze-8a64621e8c8610a45884df82b46859bc3297d3e3.zip
CI/svg-flatten: add wasm builds
Diffstat (limited to 'svg-flatten/src/out_svg.cpp')
-rw-r--r--svg-flatten/src/out_svg.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/svg-flatten/src/out_svg.cpp b/svg-flatten/src/out_svg.cpp
index 159bf13..e778d6b 100644
--- a/svg-flatten/src/out_svg.cpp
+++ b/svg-flatten/src/out_svg.cpp
@@ -37,6 +37,7 @@ SimpleSVGOutput::SimpleSVGOutput(ostream &out, bool only_polys, int digits_frac,
}
void SimpleSVGOutput::header_impl(d2p origin, d2p size) {
+ cerr << "svg: header" << endl;
m_offset[0] = origin[0];
m_offset[1] = origin[1];
m_out << "<svg width=\"" << size[0] << "mm\" height=\"" << size[1] << "mm\" viewBox=\"0 0 "
@@ -44,6 +45,7 @@ void SimpleSVGOutput::header_impl(d2p origin, d2p size) {
}
SimpleSVGOutput &SimpleSVGOutput::operator<<(GerberPolarityToken pol) {
+ cerr << "svg: got polarity " << pol << endl;
if (pol == GRB_POL_DARK) {
m_current_color = m_dark_color;
} else if (pol == GRB_POL_CLEAR) {
@@ -56,6 +58,7 @@ SimpleSVGOutput &SimpleSVGOutput::operator<<(GerberPolarityToken pol) {
}
SimpleSVGOutput &SimpleSVGOutput::operator<<(const Polygon &poly) {
+ cerr << "svg: got poly of size " << poly.size() << endl;
if (poly.size() < 3) {
cerr << "Warning: " << poly.size() << "-element polygon passed to SimpleGerberOutput" << endl;
return *this;
@@ -75,6 +78,7 @@ SimpleSVGOutput &SimpleSVGOutput::operator<<(const Polygon &poly) {
}
void SimpleSVGOutput::footer_impl() {
+ cerr << "svg: footer" << endl;
m_out << "</svg>" << endl;
}