Initial scene to svg conversion.

This commit is contained in:
James Grogan 2022-12-08 08:48:18 +00:00
parent 65ac927929
commit 1fc730d413
15 changed files with 164 additions and 28 deletions

View file

@ -25,6 +25,11 @@ TEST_CASE(TestSvgWriter, "web")
rectangle->setFill({0, 0, 255});
document->getRoot()->addChild(std::move(rectangle));
auto triangle = std::make_unique<SvgPolygon>();
triangle->setPoints({{10, 10}, {50, 10}, {30, 20}});
triangle->setFill({0, 255, 0});
document->getRoot()->addChild(std::move(triangle));
SvgWriter writer;
auto content = writer.toString(document.get());