1 #include "shapes/paint/gradient_stop.hpp"
2 #include "shapes/paint/linear_gradient.hpp"
6 StatusCode GradientStop::onAddedDirty(CoreContext* context)
8 StatusCode code = Super::onAddedDirty(context);
9 if (code != StatusCode::Ok)
14 if (!parent()->is<LinearGradient>())
16 return StatusCode::MissingObject;
18 parent()->as<LinearGradient>()->addStop(this);
19 return StatusCode::Ok;
22 void GradientStop::colorValueChanged()
24 parent()->as<LinearGradient>()->markGradientDirty();
26 void GradientStop::positionChanged()
28 parent()->as<LinearGradient>()->markStopsDirty();