1 #include "rive/shapes/paint/shape_paint_mutator.hpp"
2 #include "rive/component.hpp"
3 #include "rive/shapes/paint/shape_paint.hpp"
7 bool ShapePaintMutator::initPaintMutator(Component* component) {
8 auto parent = component->parent();
9 m_Component = component;
10 if (parent->is<ShapePaint>()) {
11 // Set this object as the mutator for the shape paint and get a
12 // reference to the paint we'll be mutating.
13 m_RenderPaint = parent->as<ShapePaint>()->initRenderPaint(this);
19 void ShapePaintMutator::renderOpacity(float value) {
20 if (m_RenderOpacity == value) {
23 m_RenderOpacity = value;
24 renderOpacityChanged();