X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fanimated-shapes%2Fanimated-shapes-example.cpp;h=2960f473d7c67d58f6ecdf8d8b441ea28f92211b;hb=2e182925204bf3ef9f2a36cbfbf998e79fbafaf5;hp=dd79982a9abef5f2b2dc238b450eb5a08b391f61;hpb=40844807e7258f1e5d9ef1a3650f438c8777409c;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/animated-shapes/animated-shapes-example.cpp b/examples/animated-shapes/animated-shapes-example.cpp index dd79982..2960f47 100644 --- a/examples/animated-shapes/animated-shapes-example.cpp +++ b/examples/animated-shapes/animated-shapes-example.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -110,11 +110,11 @@ public: // Creates the background gradient Toolkit::Control background = Dali::Toolkit::Control::New(); - background.SetAnchorPoint( Dali::AnchorPoint::CENTER ); - background.SetParentOrigin( Dali::ParentOrigin::CENTER ); + background.SetProperty( Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::CENTER ); + background.SetProperty( Actor::Property::PARENT_ORIGIN, Dali::ParentOrigin::CENTER ); background.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::ALL_DIMENSIONS ); Dali::Property::Map map; - map.Insert( Visual::Property::TYPE, Visual::GRADIENT ); + map.Insert( Toolkit::Visual::Property::TYPE, Visual::GRADIENT ); Property::Array stopOffsets; stopOffsets.PushBack( 0.0f ); stopOffsets.PushBack( 1.0f ); @@ -132,8 +132,8 @@ public: // Create a TextLabel for the application title. Toolkit::TextLabel label = Toolkit::TextLabel::New( APPLICATION_TITLE ); - label.SetAnchorPoint( AnchorPoint::TOP_CENTER ); - label.SetParentOrigin( Vector3( 0.5f, 0.0f, 0.5f ) ); + label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); + label.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.0f, 0.5f ) ); label.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); label.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) ); @@ -211,10 +211,10 @@ public: renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); Actor actor = Actor::New(); - actor.SetSize( 400.0f, 400.0f ); - actor.SetPosition( center ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); - actor.SetColor(Vector4(1.0f,1.0f,0.0f,1.0f) ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); + actor.SetProperty( Actor::Property::POSITION, center ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,1.0f,0.0f,1.0f) ); actor.AddRenderer( renderer ); Stage stage = Stage::GetCurrent(); @@ -303,9 +303,9 @@ public: renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); Actor actor = Actor::New(); - actor.SetSize( 400.0f, 400.0f ); - actor.SetPosition( center ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); + actor.SetProperty( Actor::Property::POSITION, center ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); actor.AddRenderer( renderer ); Stage stage = Stage::GetCurrent(); @@ -404,10 +404,10 @@ public: renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON ); Actor actor = Actor::New(); - actor.SetSize( 400.0f, 400.0f ); - actor.SetPosition( center ); - actor.SetAnchorPoint( AnchorPoint::CENTER ); - actor.SetColor(Vector4(1.0f,0.0f,0.0f,1.0f) ); + actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) ); + actor.SetProperty( Actor::Property::POSITION, center ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,0.0f,0.0f,1.0f) ); actor.AddRenderer( renderer ); Stage stage = Stage::GetCurrent(); @@ -460,16 +460,10 @@ private: }; -void RunTest( Application& application ) +int DALI_EXPORT_API main( int argc, char **argv ) { + Application application = Application::New( &argc, &argv ); AnimatedShapesExample test( application ); application.MainLoop(); -} - -int main( int argc, char **argv ) -{ - Application application = Application::New( &argc, &argv ); - RunTest( application ); - return 0; }