submodule: add rive-cpp to rive-tizen as submodule
[platform/core/uifw/rive-tizen.git] / submodule / include / shapes / paint / shape_paint.hpp
1 #ifndef _RIVE_SHAPE_PAINT_HPP_
2 #define _RIVE_SHAPE_PAINT_HPP_
3 #include "generated/shapes/paint/shape_paint_base.hpp"
4 #include "renderer.hpp"
5 #include "shapes/paint/blend_mode.hpp"
6 #include "shapes/paint/shape_paint_mutator.hpp"
7 #include "shapes/path_space.hpp"
8 namespace rive
9 {
10         class RenderPaint;
11         class ShapePaintMutator;
12         class ShapePaint : public ShapePaintBase
13         {
14         protected:
15                 RenderPaint* m_RenderPaint = nullptr;
16                 ShapePaintMutator* m_PaintMutator = nullptr;
17
18         public:
19                 ~ShapePaint();
20                 StatusCode onAddedClean(CoreContext* context) override;
21
22                 float renderOpacity() const { return m_PaintMutator->renderOpacity(); }
23                 void renderOpacity(float value)
24                 {
25                         m_PaintMutator->renderOpacity(value);
26                 }
27
28                 void blendMode(BlendMode value);
29
30                 /// Creates a RenderPaint object for the provided ShapePaintMutator*.
31                 /// This should be called only once as the ShapePaint manages the
32                 /// lifecycle of the RenderPaint.
33                 virtual RenderPaint* initRenderPaint(ShapePaintMutator* mutator);
34
35                 virtual PathSpace pathSpace() const = 0;
36
37                 virtual void draw(Renderer* renderer, CommandPath* path) = 0;
38         };
39 } // namespace rive
40
41 #endif