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"
11 class ShapePaintMutator;
12 class ShapePaint : public ShapePaintBase
15 RenderPaint* m_RenderPaint = nullptr;
16 ShapePaintMutator* m_PaintMutator = nullptr;
20 StatusCode onAddedClean(CoreContext* context) override;
22 float renderOpacity() const { return m_PaintMutator->renderOpacity(); }
23 void renderOpacity(float value)
25 m_PaintMutator->renderOpacity(value);
28 void blendMode(BlendMode value);
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);
35 virtual PathSpace pathSpace() const = 0;
37 virtual void draw(Renderer* renderer, CommandPath* path) = 0;