Add path rendering.
This commit is contained in:
parent
f2ab532005
commit
97afa782a0
39 changed files with 1148 additions and 131 deletions
36
src/rendering/visual_elements/svg/SvgPainter.h
Normal file
36
src/rendering/visual_elements/svg/SvgPainter.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#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 paintPath(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;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue