up-to-date submodule (rive-cpp)
[platform/core/uifw/rive-tizen.git] / submodule / include / shapes / paint / shape_paint_mutator.hpp
1 #ifndef _RIVE_SHAPE_PAINT_MUTATOR_HPP_
2 #define _RIVE_SHAPE_PAINT_MUTATOR_HPP_
3
4 namespace rive
5 {
6         class Component;
7         class RenderPaint;
8         class ShapePaintMutator
9         {
10         private:
11                 float m_RenderOpacity = 1.0f;
12                 RenderPaint* m_RenderPaint = nullptr;
13                 /// The Component providing this ShapePaintMutator interface.
14                 Component* m_Component = nullptr;
15
16         protected:
17                 /// Hook up this paint mutator as the mutator for the shape paint
18                 /// expected to be the parent.
19                 bool initPaintMutator(Component* component);
20                 virtual void renderOpacityChanged() = 0;
21
22                 RenderPaint* renderPaint() const { return m_RenderPaint; }
23
24         public:
25                 float renderOpacity() const { return m_RenderOpacity; }
26                 void renderOpacity(float value);
27
28                 Component* component() const { return m_Component; }
29         };
30 } // namespace rive
31 #endif