1 #ifndef _RIVE_PATH_HPP_
2 #define _RIVE_PATH_HPP_
3 #include "generated/shapes/path_base.hpp"
4 #include "math/mat2d.hpp"
13 class Path : public PathBase
16 Shape* m_Shape = nullptr;
17 CommandPath* m_CommandPath = nullptr;
18 std::vector<PathVertex*> m_Vertices;
22 Shape* shape() const { return m_Shape; }
23 StatusCode onAddedDirty(CoreContext* context) override;
24 StatusCode onAddedClean(CoreContext* context) override;
25 void buildDependencies() override;
26 virtual const Mat2D& pathTransform() const;
27 CommandPath* commandPath() const { return m_CommandPath; }
28 void update(ComponentDirt value) override;
30 void addVertex(PathVertex* vertex);
32 virtual void markPathDirty();
33 virtual bool isPathClosed() const { return true; }
34 void onDirty(ComponentDirt dirt) override;
36 std::vector<PathVertex*>& vertices() { return m_Vertices; }