X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fclipping%2Fclipping-example.cpp;h=408d5c535c5afdaf1c8c8895003d9759c0f7fd59;hb=2e182925204bf3ef9f2a36cbfbf998e79fbafaf5;hp=884bc1833d917b35e3e3fb2716c9afca83102042;hpb=8b8df4bd98ecbf5226c2f06d477aec784d326860;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/clipping/clipping-example.cpp b/examples/clipping/clipping-example.cpp index 884bc18..408d5c5 100644 --- a/examples/clipping/clipping-example.cpp +++ b/examples/clipping/clipping-example.cpp @@ -83,8 +83,8 @@ private: // Create a TextLabel for the application title. Toolkit::TextLabel label = Toolkit::TextLabel::New( APPLICATION_TITLE ); - label.SetAnchorPoint( AnchorPoint::TOP_CENTER ); - label.SetParentOrigin( APPLICATION_TITLE_PARENT_ORIGIN ); + label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER ); + label.SetProperty( Actor::Property::PARENT_ORIGIN, APPLICATION_TITLE_PARENT_ORIGIN ); label.SetProperty( Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" ); label.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" ); label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE ); @@ -92,8 +92,8 @@ private: // Create an item-view which clips its children. mItemView = ItemView::New( mClippingItemFactory ); - mItemView.SetParentOrigin( ParentOrigin::CENTER ); - mItemView.SetAnchorPoint( AnchorPoint::CENTER ); + mItemView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + mItemView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); mItemView.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN ); // Enable clipping. No need to create any renderers. stage.Add( mItemView ); @@ -116,14 +116,14 @@ private: // Create a border around item-view (as item-view is clipping its children, we should NOT add this as a child of item-view). Control border = Control::New(); - border.SetParentOrigin( ParentOrigin::CENTER ); - border.SetAnchorPoint( AnchorPoint::CENTER ); + border.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER ); + border.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER ); border.SetProperty( Control::Property::BACKGROUND, Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::BORDER ) .Add( BorderVisual::Property::COLOR, Color::WHITE ) .Add( BorderVisual::Property::SIZE, 2.0f ) .Add( BorderVisual::Property::ANTI_ALIASING, true ) ); - border.SetSize( Vector3( itemViewLayoutSize.x + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.y + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.z + ITEM_VIEW_BORDER_SIZE * 2.0f ) ); + border.SetProperty( Actor::Property::SIZE, Vector3( itemViewLayoutSize.x + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.y + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.z + ITEM_VIEW_BORDER_SIZE * 2.0f ) ); stage.Add( border ); // Constrain the border's orientation to the orientation of item-view. @@ -133,8 +133,8 @@ private: // Create a button to toggle the clipping mode PushButton button = Toolkit::PushButton::New(); - button.SetParentOrigin( ParentOrigin::BOTTOM_CENTER ); - button.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER ); + button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER ); + button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER ); button.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); button.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::HEIGHT ); button.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );