[Adaptation Layer] Added rive-tizen adaptation layer class.
[platform/core/uifw/rive-tizen.git] / submodule / include / shapes / shape.hpp
1 #ifndef _RIVE_SHAPE_HPP_
2 #define _RIVE_SHAPE_HPP_
3 #include "generated/shapes/shape_base.hpp"
4 #include "shapes/path_composer.hpp"
5 #include "shapes/shape_paint_container.hpp"
6 #include <vector>
7
8 namespace rive
9 {
10         class Path;
11         class PathComposer;
12         class Shape : public ShapeBase, public ShapePaintContainer
13         {
14         private:
15                 PathComposer m_PathComposer;
16                 std::vector<Path*> m_Paths;
17
18                 bool m_WantDifferencePath = false;
19
20         public:
21                 Shape();
22                 void buildDependencies() override;
23                 void addPath(Path* path);
24                 std::vector<Path*>& paths() { return m_Paths; }
25
26                 bool wantDifferencePath() const { return m_WantDifferencePath; }
27
28                 void update(ComponentDirt value) override;
29                 void draw(Renderer* renderer) override;
30
31                 PathComposer* pathComposer() const
32                 {
33                         return (PathComposer*)&m_PathComposer;
34                 }
35
36                 void pathChanged();
37                 void addDefaultPathSpace(PathSpace space);
38                 StatusCode onAddedDirty(CoreContext* context) override;
39         };
40 } // namespace rive
41
42 #endif