30 lines
707 B
C++
30 lines
707 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
class SvgDocument;
|
|
class SvgShapeElement;
|
|
class XmlAttribute;
|
|
|
|
class Scene;
|
|
class SceneModel;
|
|
class SceneText;
|
|
|
|
class Transform;
|
|
|
|
class SvgConverter
|
|
{
|
|
public:
|
|
std::unique_ptr<SvgDocument> convert(Scene* scene, double width = 800.0, double height = 800.0) const;
|
|
|
|
private:
|
|
void convertMesh(SvgDocument* document, SceneModel* model, bool showOutline = false) const;
|
|
|
|
void convertPrimitive(SvgDocument* document, SceneModel* model) const;
|
|
|
|
void convertText(SvgDocument* document, SceneText* model) const;
|
|
|
|
void setStyle(SceneModel* model, SvgShapeElement* element) const;
|
|
|
|
std::unique_ptr<XmlAttribute> toTransform(const Transform& transform) const;
|
|
};
|