#include <dali/public-api/common/dali-common.h>
#include <dali/devel-api/object/handle-devel.h>
#include <dali/devel-api/scripting/enum-helper.h>
+#include <dali/devel-api/rendering/renderer-devel.h>
#include <dali/integration-api/debug.h>
//INTERNAL HEARDER
mImpl->mName = name;
}
-const std::string& Visual::Base::GetName()
+const std::string& Visual::Base::GetName() const
{
return mImpl->mName;
}
{
DoSetOffStage( actor );
mImpl->mMixColorIndex = Property::INVALID_INDEX;
- mImpl->mOpacityIndex = Property::INVALID_INDEX;
mImpl->mFlags &= ~Impl::IS_ON_STAGE;
}
}
mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
}
- if( mImpl->mOpacityIndex == Property::INVALID_INDEX )
- {
- mImpl->mOpacityIndex = DevelHandle::RegisterProperty(
- mImpl->mRenderer,
- Toolkit::Visual::Property::OPACITY,
- OPACITY,
- mImpl->mMixColor.a );
- }
+ mImpl->mRenderer.SetProperty( DevelRenderer::Property::OPACITY, mImpl->mMixColor.a );
float preMultipliedAlpha = 0.0f;
if( IsPreMultipliedAlphaEnabled() )
if( mImpl->mRenderer )
{
mImpl->mRenderer.SetProperty( mImpl->mMixColorIndex, Vector3(color) );
- mImpl->mRenderer.SetProperty( mImpl->mOpacityIndex, color.a );
+ mImpl->mRenderer.SetProperty( DevelRenderer::Property::OPACITY, color.a );
if( color.a < 1.f )
{
mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
Dali::Animation& transition,
Internal::TransitionData::Animator& animator )
{
- Property::Index index = mImpl->mOpacityIndex;
-
bool isOpaque = mImpl->mMixColor.a >= 1.0f;
- if( index != Property::INVALID_INDEX )
+ float initialOpacity;
+ if( animator.initialValue.Get( initialOpacity ) )
{
- float initialOpacity;
- if( animator.initialValue.Get( initialOpacity ) )
- {
- isOpaque = (initialOpacity >= 1.0f);
- }
-
- float targetOpacity;
- if( animator.targetValue.Get( targetOpacity ) )
- {
- mImpl->mMixColor.a = targetOpacity;
- }
+ isOpaque = (initialOpacity >= 1.0f);
+ }
- SetupTransition( transition, animator, index, animator.initialValue, animator.targetValue );
- SetupBlendMode( transition, isOpaque, animator.animate );
+ float targetOpacity;
+ if( animator.targetValue.Get( targetOpacity ) )
+ {
+ mImpl->mMixColor.a = targetOpacity;
}
+
+ SetupTransition( transition, animator, DevelRenderer::Property::OPACITY, animator.initialValue, animator.targetValue );
+ SetupBlendMode( transition, isOpaque, animator.animate );
}
void Visual::Base::AnimateRendererProperty(
SetupTransition( transition, animator, index, initialMixColor, targetMixColor );
if( animateOpacity )
{
- SetupTransition( transition, animator, mImpl->mOpacityIndex, initialOpacity, targetOpacity );
+ SetupTransition( transition, animator, DevelRenderer::Property::OPACITY, initialOpacity, targetOpacity );
SetupBlendMode( transition, isOpaque, animator.animate );
}
}