X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fcompressed-texture-formats%2Fcompressed-texture-formats-example.cpp;h=a62791efc0e53c537355e9efa54c477dbd6b78fe;hb=2e182925204bf3ef9f2a36cbfbf998e79fbafaf5;hp=606f8cdfa6e708ee1c280bdbc0d7ee8998184399;hpb=312470da17142a335f5f743630b7fc19c0061ead;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp index 606f8cd..a62791e 100644 --- a/examples/compressed-texture-formats/compressed-texture-formats-example.cpp +++ b/examples/compressed-texture-formats/compressed-texture-formats-example.cpp @@ -77,7 +77,7 @@ void AddImage( const char*imagePath, Actor& actor, Geometry& geometry, Shader& s renderer.SetTextures( textureSet ); //Set actor size and add the renderer - actor.SetSize( texture.GetWidth(), texture.GetHeight() ); + actor.SetProperty( Actor::Property::SIZE, Vector2( texture.GetWidth(), texture.GetHeight() ) ); actor.AddRenderer( renderer ); } @@ -112,8 +112,8 @@ public: // Setup a TableView to hold a grid of images and labels. Toolkit::TableView table = Toolkit::TableView::New( 3u, 2u ); - table.SetAnchorPoint( AnchorPoint::CENTER ); - table.SetParentOrigin( ParentOrigin::CENTER ); + table.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + table.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); table.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); table.SetRelativeWidth( 0u, 0.5f ); table.SetRelativeWidth( 1u, 0.5f ); @@ -124,24 +124,24 @@ public: // Add text labels. TextLabel textLabel = TextLabel::New( "ETC1 (KTX):" ); - textLabel.SetAnchorPoint( AnchorPoint::CENTER ); - textLabel.SetParentOrigin( ParentOrigin::CENTER ); + textLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + textLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); textLabel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); textLabel.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true ); table.AddChild( textLabel, Toolkit::TableView::CellPosition( 0u, 0u ) ); table.SetCellAlignment( Toolkit::TableView::CellPosition( 0u, 0u ), HorizontalAlignment::LEFT, VerticalAlignment::CENTER ); textLabel = TextLabel::New( "ASTC (KTX) 4x4 linear:" ); - textLabel.SetAnchorPoint( AnchorPoint::CENTER ); - textLabel.SetParentOrigin( ParentOrigin::CENTER ); + textLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + textLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); textLabel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); textLabel.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true ); table.AddChild( textLabel, Toolkit::TableView::CellPosition( 1u, 0u ) ); table.SetCellAlignment( Toolkit::TableView::CellPosition( 1u, 0u ), HorizontalAlignment::LEFT, VerticalAlignment::CENTER ); textLabel = TextLabel::New( "ASTC (Native) 4x4 linear:" ); - textLabel.SetAnchorPoint( AnchorPoint::CENTER ); - textLabel.SetParentOrigin( ParentOrigin::CENTER ); + textLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + textLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); textLabel.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS ); textLabel.SetProperty( Toolkit::TextLabel::Property::MULTI_LINE, true ); table.AddChild( textLabel, Toolkit::TableView::CellPosition( 2u, 0u ) ); @@ -153,22 +153,22 @@ public: // Add images. Actor actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::CENTER ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); AddImage( IMAGE_FILENAME_ETC, actor, geometry, shader ); table.AddChild( actor, Toolkit::TableView::CellPosition( 0u, 1u ) ); table.SetCellAlignment( Toolkit::TableView::CellPosition( 0u, 1u ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER ); actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::CENTER ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); AddImage( IMAGE_FILENAME_ASTC_LINEAR, actor, geometry, shader ); table.AddChild( actor, Toolkit::TableView::CellPosition( 1u, 1u ) ); table.SetCellAlignment( Toolkit::TableView::CellPosition( 1u, 1u ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER ); actor = Actor::New(); - actor.SetAnchorPoint( AnchorPoint::CENTER ); - actor.SetParentOrigin( ParentOrigin::CENTER ); + actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); + actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); AddImage( IMAGE_FILENAME_ASTC_LINEAR_NATIVE, actor, geometry, shader ); table.AddChild( actor, Toolkit::TableView::CellPosition( 2u, 1u ) ); table.SetCellAlignment( Toolkit::TableView::CellPosition( 2u, 1u ), HorizontalAlignment::CENTER, VerticalAlignment::CENTER );