X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fvisuals%2Fborder%2Fborder-visual.cpp;h=94376e699b0e5550b612a7d88a7d876de32d2af3;hp=a64b48d70c404c064429750192b212c5ddf01558;hb=bfa5276cfac80f6dd1f874503e6fefb74a90b19e;hpb=0cc276cf527fec3032e5b02f631466105ec7827b diff --git a/dali-toolkit/internal/visuals/border/border-visual.cpp b/dali-toolkit/internal/visuals/border/border-visual.cpp index a64b48d..94376e6 100644 --- a/dali-toolkit/internal/visuals/border/border-visual.cpp +++ b/dali-toolkit/internal/visuals/border/border-visual.cpp @@ -20,7 +20,6 @@ // EXTERNAL INCLUDES #include -#include // INTERNAL INCLUDES #include @@ -125,7 +124,7 @@ BorderVisualPtr BorderVisual::New( VisualFactoryCache& factoryCache, const Prope } BorderVisual::BorderVisual( VisualFactoryCache& factoryCache ) -: Visual::Base( factoryCache, Visual::FittingMode::FILL ), +: Visual::Base( factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::BORDER ), mBorderColor( Color::TRANSPARENT ), mBorderSize( 0.f ), mBorderColorIndex( Property::INVALID_INDEX ), @@ -197,16 +196,16 @@ void BorderVisual::DoSetProperty( Dali::Property::Index index, } } -void BorderVisual::DoSetOnStage( Actor& actor ) +void BorderVisual::DoSetOnScene( Actor& actor ) { InitializeRenderer(); - mBorderColorIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, Toolkit::BorderVisual::Property::COLOR, COLOR_NAME, mBorderColor ); + mBorderColorIndex = mImpl->mRenderer.RegisterProperty( Toolkit::BorderVisual::Property::COLOR, COLOR_NAME, mBorderColor ); if( mBorderColor.a < 1.f || mAntiAliasing) { mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); } - mBorderSizeIndex = DevelHandle::RegisterProperty( mImpl->mRenderer, Toolkit::BorderVisual::Property::SIZE, SIZE_NAME, mBorderSize ); + mBorderSizeIndex = mImpl->mRenderer.RegisterProperty( Toolkit::BorderVisual::Property::SIZE, SIZE_NAME, mBorderSize ); actor.AddRenderer( mImpl->mRenderer ); @@ -252,47 +251,6 @@ void BorderVisual::InitializeRenderer() mImpl->mTransform.RegisterUniforms( mImpl->mRenderer, Direction::LEFT_TO_RIGHT ); } -void BorderVisual::SetBorderColor(const Vector4& color) -{ - mBorderColor = color; - - if( mImpl->mRenderer ) - { - (mImpl->mRenderer).SetProperty( mBorderColorIndex, color ); - if( color.a < 1.f ) - { - mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); - } - } -} - -void BorderVisual::SetBorderSize( float size ) -{ - mBorderSize = size; - - if( mImpl->mRenderer ) - { - (mImpl->mRenderer).SetProperty( mBorderSizeIndex, size ); - } -} - -void BorderVisual::RequireAntiAliasing( bool antiAliasing ) -{ - if( mAntiAliasing != antiAliasing ) - { - mAntiAliasing = antiAliasing; - if( mImpl->mRenderer ) - { - Shader borderShader( GetBorderShader() ); - mImpl->mRenderer.SetShader( borderShader ); - if( mAntiAliasing ) - { - mImpl->mRenderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); - } - } - } -} - Shader BorderVisual::GetBorderShader() { Shader shader;