X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fvisual-base-impl.cpp;h=d152a7fb67b7215edf785974e4027f71efca8f79;hp=4156d1a091573f9e05b6934899177abd56a5e128;hb=97d688bcdfb692dd2ff535c1965077dd747cfcf6;hpb=e35b08ebd60473aef7500601706f665ac8cf7d39 diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index 4156d1a..d152a7f 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -55,11 +55,11 @@ void Visual::Base::SetCustomShader( const Property::Map& shaderMap ) } else { - mImpl->mCustomShader = new Impl::CustomShader( shaderMap ); + mImpl->mCustomShader = new Impl::CustomShader( shaderMap ); } } -void Visual::Base::Initialize( Actor& actor, const Property::Map& propertyMap ) +void Visual::Base::SetProperties( const Property::Map& propertyMap ) { Property::Value* customShaderValue = propertyMap.Find( Toolkit::Visual::Property::SHADER, CUSTOM_SHADER ); if( customShaderValue ) @@ -71,7 +71,17 @@ void Visual::Base::Initialize( Actor& actor, const Property::Map& propertyMap ) } } - DoInitialize( actor, propertyMap ); + DoSetProperties( propertyMap ); +} + +void Visual::Base::SetName( const std::string& name ) +{ + mImpl->mName = name; +} + +const std::string& Visual::Base::GetName() +{ + return mImpl->mName; } void Visual::Base::SetSize( const Vector2& size ) @@ -84,6 +94,11 @@ const Vector2& Visual::Base::GetSize() const return mImpl->mSize; } +float Visual::Base::GetHeightForWidth( float width ) const +{ + return 0.f; +} + void Visual::Base::GetNaturalSize( Vector2& naturalSize ) const { naturalSize = Vector2::ZERO; @@ -124,6 +139,16 @@ void Visual::Base::SetOffStage( Actor& actor ) } } +void Visual::Base::CreatePropertyMap( Property::Map& map ) const +{ + DoCreatePropertyMap( map ); + + if( mImpl->mCustomShader ) + { + mImpl->mCustomShader->CreatePropertyMap( map ); + } +} + void Visual::Base::EnablePreMultipliedAlpha( bool preMultipled ) { if(preMultipled) @@ -152,16 +177,6 @@ void Visual::Base::DoSetOffStage( Actor& actor ) mImpl->mRenderer.Reset(); } -void Visual::Base::CreatePropertyMap( Property::Map& map ) const -{ - DoCreatePropertyMap( map ); - - if( mImpl->mCustomShader ) - { - mImpl->mCustomShader->CreatePropertyMap( map ); - } -} - bool Visual::Base::IsOnStage() const { return mImpl->mFlags & Impl::IS_ON_STAGE;