Add svg conversion.
This commit is contained in:
parent
1f85954e98
commit
dfbc87cb09
33 changed files with 602 additions and 79 deletions
|
@ -5,7 +5,7 @@
|
|||
#include "AbstractPainter.h"
|
||||
#include "Scene.h"
|
||||
|
||||
#include "SvgConverter.h"
|
||||
#include "SvgPainter.h"
|
||||
#include "SvgWriter.h"
|
||||
#include "SvgDocument.h"
|
||||
|
||||
|
@ -25,6 +25,8 @@ public:
|
|||
mDrawingContext = std::make_unique<DrawingContext>(mSurface.get());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Scene* getScene() const
|
||||
{
|
||||
return mSurface->getScene();
|
||||
|
@ -47,8 +49,8 @@ public:
|
|||
|
||||
static void writeSvg(const Path& path, Scene* scene)
|
||||
{
|
||||
SvgConverter converter;
|
||||
auto svg_document = converter.convert(scene);
|
||||
SvgPainter painter;
|
||||
auto svg_document = painter.paint(scene);
|
||||
|
||||
SvgWriter writer;
|
||||
auto svg_content = writer.toString(svg_document.get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue