removing MarchingSquares::dumpLinesToHtml

master
dmatetelki 10 years ago
parent 984334daf9
commit d829f72125

@ -2,12 +2,9 @@
#include "floats.hpp" #include "floats.hpp"
// #include <errno.h> // for strerror needed by png++/error.hpp // #include <cstring> // for strerror needed by png++/error.hpp
#include <string.h> // for strerror needed by png++/error.hpp
#include <png++/png.hpp> #include <png++/png.hpp>
// #include <iostream>
#include <sstream>
MarchingSquares::MarchingSquares() MarchingSquares::MarchingSquares()
@ -117,19 +114,3 @@ MarchingSquares::RunMarchingSquares() {
return lines; return lines;
} }
std::string
dumpLinesToHtml(const std::vector< std::pair< float2, float2 > >& lines, int w, int h)
{
std::stringstream ss;
// dump to HTML/SVG
ss << "<!DOCTYPE html>" << std::endl;
ss << "<html><body><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewbox=\"0 0 " << w << " " << h << "\">" << std::endl;
for (size_t i = 0; i < lines.size(); ++i) {
const std::pair<float2, float2>& l = lines[i];
ss << "\t<line x1=\"" << l.first.x << "\" y1=\"" << l.first.y << "\" x2=\"" << l.second.x << "\" y2=\"" << l.second.y << "\" stroke=\"black\" stroke-width=\"0.25\"/>" << std::endl;
}
ss << "</svg></body></html>" << std::endl;
return ss.str();
}

@ -22,6 +22,4 @@ private:
std::vector<CellType> cells_; std::vector<CellType> cells_;
}; };
std::string dumpLinesToHtml(const std::vector< std::pair<float2, float2> >& lines, int w, int h);
#endif // WORLD_WORLD_HPP #endif // WORLD_WORLD_HPP

Loading…
Cancel
Save