42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
class SvgDocument;
|
|
class SvgShapeElement;
|
|
class XmlAttribute;
|
|
|
|
class Scene;
|
|
class SceneModel;
|
|
class SceneText;
|
|
|
|
class Transform;
|
|
|
|
class SvgPainter
|
|
{
|
|
public:
|
|
std::unique_ptr<SvgDocument> paint(Scene* scene, double width = 800.0, double height = 800.0) const;
|
|
|
|
private:
|
|
void paintMesh(SvgDocument* document, SceneModel* model, bool showOutline = false) const;
|
|
|
|
void paintPrimitive(SvgDocument* document, SceneModel* model) const;
|
|
|
|
void paintRect(SvgDocument* document, SceneModel* model) const;
|
|
|
|
void paintCircle(SvgDocument* document, SceneModel* model) const;
|
|
|
|
void paintLine(SvgDocument* document, SceneModel* model) const;
|
|
|
|
void paintLineSegment(SvgDocument* document, SceneModel* model) const;
|
|
|
|
void paintPath(SvgDocument* document, SceneModel* model) const;
|
|
|
|
void paintPolygon(SvgDocument* document, SceneModel* model) const;
|
|
|
|
void paintText(SvgDocument* document, SceneText* model) const;
|
|
|
|
void setStyle(SceneModel* model, SvgShapeElement* element) const;
|
|
|
|
std::unique_ptr<XmlAttribute> toTransform(const Transform& transform) const;
|
|
};
|