diff --git a/svg01.cpp b/svg01.cpp new file mode 100644 index 0000000..4d7589e --- /dev/null +++ b/svg01.cpp @@ -0,0 +1,27 @@ +#include "svg01.h" +#include <vector> +#include <iostream> + +using namespace std; + +void +svg_begin(double width, double height) { + cout << "<?xml version='1.0' encoding='UTF-8'?>\n"; + cout << "<svg "; + cout << "width='" << width << "' "; + cout << "height='" << height << "' "; + cout << "viewBox='0 0 " << width << " " << height << "' "; + cout << "xmlns='http://www.w3.org/2000/svg'>\n"; +} + +void +svg_end() { + cout << "</svg>\n"; +} + +void +show_histogram_svg(const vector<size_t>& bins) { + svg_begin(400, 300); + svg_end(); +} +