+void ImageActor::SetSortModifier(float modifier)
+{
+ mRenderer->SetDepthIndex( modifier );
+}
+
+float ImageActor::GetSortModifier() const
+{
+ return mRenderer->GetDepthIndex();
+}
+
+void ImageActor::SetBlendMode( BlendingMode::Type mode )
+{
+ mRenderer->SetBlendMode( static_cast<BlendMode::Type>( mode ) );
+}
+
+BlendingMode::Type ImageActor::GetBlendMode() const
+{
+ return static_cast<BlendingMode::Type>( mRenderer->GetBlendMode() );
+}
+
+void ImageActor::SetBlendFunc( BlendingFactor::Type srcFactorRgba, BlendingFactor::Type destFactorRgba )
+{
+ mRenderer->SetBlendFunc( static_cast<BlendFactor::Type>(srcFactorRgba), static_cast<BlendFactor::Type>(destFactorRgba), static_cast<BlendFactor::Type>(srcFactorRgba), static_cast<BlendFactor::Type>(destFactorRgba) );
+}
+
+void ImageActor::SetBlendFunc( BlendingFactor::Type srcFactorRgb, BlendingFactor::Type destFactorRgb,
+ BlendingFactor::Type srcFactorAlpha, BlendingFactor::Type destFactorAlpha )
+{
+ mRenderer->SetBlendFunc( static_cast<BlendFactor::Type>(srcFactorRgb), static_cast<BlendFactor::Type>(destFactorRgb), static_cast<BlendFactor::Type>(srcFactorAlpha), static_cast<BlendFactor::Type>(destFactorAlpha) );
+}
+
+void ImageActor::GetBlendFunc( BlendingFactor::Type& srcFactorRgb, BlendingFactor::Type& destFactorRgb,
+ BlendingFactor::Type& srcFactorAlpha, BlendingFactor::Type& destFactorAlpha ) const
+{
+ mRenderer->GetBlendFunc( reinterpret_cast<BlendFactor::Type&>(srcFactorRgb), reinterpret_cast<BlendFactor::Type&>(destFactorRgb), reinterpret_cast<BlendFactor::Type&>(srcFactorAlpha), reinterpret_cast<BlendFactor::Type&>(destFactorAlpha) );
+}
+
+void ImageActor::SetBlendEquation( BlendingEquation::Type equationRgba )
+{
+ mRenderer->SetBlendEquation( static_cast<BlendEquation::Type>(equationRgba), static_cast<BlendEquation::Type>(equationRgba) );
+}
+
+void ImageActor::SetBlendEquation( BlendingEquation::Type equationRgb, BlendingEquation::Type equationAlpha )
+{
+ mRenderer->SetBlendEquation( static_cast<BlendEquation::Type>(equationRgb), static_cast<BlendEquation::Type>(equationAlpha) );
+}
+
+void ImageActor::GetBlendEquation( BlendingEquation::Type& equationRgb, BlendingEquation::Type& equationAlpha ) const
+{
+ mRenderer->GetBlendEquation( reinterpret_cast<BlendEquation::Type&>(equationRgb), reinterpret_cast<BlendEquation::Type&>(equationAlpha) );
+}
+
+void ImageActor::SetBlendColor( const Vector4& color )
+{
+ mBlendColor = color;
+ mRenderer->SetBlendColor( mBlendColor );
+}
+
+const Vector4& ImageActor::GetBlendColor() const
+{
+ return mBlendColor;
+}
+
+void ImageActor::SetFilterMode( FilterMode::Type minFilter, FilterMode::Type magFilter )
+{
+ mMinFilter = minFilter;
+ mMagFilter = magFilter;
+
+ SamplerPtr sampler = Sampler::New();
+ sampler->SetFilterMode( minFilter, magFilter );
+ mRenderer->GetTextures()->SetSampler( 0u, sampler.Get() );
+}
+
+void ImageActor::GetFilterMode( FilterMode::Type& minFilter, FilterMode::Type& magFilter ) const
+{
+ minFilter = mMinFilter;
+ magFilter = mMagFilter;
+}
+
+void ImageActor::SetShaderEffect( ShaderEffect& effect )
+{
+ if( mShaderEffect )
+ {
+ mShaderEffect->Disconnect( this );
+ }
+
+ mShaderEffect = ShaderEffectPtr( &effect );
+ effect.Connect( this );
+
+ ShaderPtr shader = mShaderEffect->GetShader();
+ mRenderer->SetShader( *shader );
+
+ EffectImageUpdated();
+
+ UpdateGeometry();
+}
+
+ShaderEffectPtr ImageActor::GetShaderEffect() const
+{
+ return mShaderEffect;
+}
+
+void ImageActor::RemoveShaderEffect()
+{
+ if( mShaderEffect )
+ {
+ mShaderEffect->Disconnect( this );
+ // change to the standard shader and quad geometry
+ ShaderPtr shader = Shader::New( VERTEX_SHADER, FRAGMENT_SHADER, Dali::Shader::Hint::NONE );
+ mRenderer->SetShader( *shader );
+ mShaderEffect.Reset();
+
+ UpdateGeometry();
+ }
+}
+
+void ImageActor::EffectImageUpdated()
+{
+ if( mShaderEffect )
+ {
+ Dali::Image effectImage = mShaderEffect->GetEffectImage();
+ if( effectImage )
+ {
+ Image& effectImageImpl = GetImplementation( effectImage );
+ mRenderer->GetTextures()->SetImage( 1u, &effectImageImpl );
+ }
+ else
+ {
+ mRenderer->GetTextures()->SetImage( 1u, 0 );
+ }
+ }
+}
+
+void ImageActor::OnRelayout( const Vector2& size, RelayoutContainer& container )
+{
+ if( mActorSize != size )
+ {
+ mActorSize = size;
+ UpdateGeometry();
+ }
+}
+
+void ImageActor::OnSizeSet( const Vector3& targetSize )
+{
+ Vector2 size( targetSize.x, targetSize.y );
+ if( mActorSize != size )
+ {
+ mActorSize = size;
+ UpdateGeometry();
+ }
+}
+