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