- Constraint colorConstraint = Constraint::New<Vector4>(mImpl->mRenderer, shaderTextColorIndex, TextColorConstraint);
- colorConstraint.AddSource(Source(actor, mAnimatableTextColorPropertyIndex));
- colorConstraint.Apply();
-
- // Make zero if the alpha value of text color is zero to skip rendering text
- Constraint opacityConstraint = Constraint::New<float>(mImpl->mRenderer, Dali::DevelRenderer::Property::OPACITY, OpacityConstraint);
- opacityConstraint.AddSource(Source(actor, mAnimatableTextColorPropertyIndex));
- opacityConstraint.Apply();
+ // VisualRenderer::Property::OPACITY uses same animatable property internally.
+ mOpacityConstraint = Constraint::New<float>(mImpl->mRenderer, Dali::DevelRenderer::Property::OPACITY, OpacityConstraint);
+ mOpacityConstraint.AddSource(Source(actor, mAnimatableTextColorPropertyIndex));