From 87c24bd20035bd62e3b1f21cd867f0d8636bbc52 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 23 Mar 2020 21:26:06 +0100 Subject: Randomly place stones on a board --- svg.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 svg.cpp (limited to 'svg.cpp') diff --git a/svg.cpp b/svg.cpp new file mode 100644 index 0000000..e855dab --- /dev/null +++ b/svg.cpp @@ -0,0 +1,29 @@ +#include +#include "svg.h" + + +Polygon::Polygon(std::vector> pts, std::string bg) + : pts{move(pts)}, bg{move(bg)} +{} + +std::string Polygon::svg() const { + std::ostringstream ss; + ss << ""; + return ss.str(); +} + +Text::Text(double x, double y, double rotation, std::string text) + : x{x}, y{y}, rotation{rotation}, text{move(text)} +{} + +std::string Text::svg() const { + std::ostringstream ss; + ss << ""; + ss << text << ""; + return ss.str(); +} -- cgit v1.2.3-54-g00ecf