X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fclipping%2Fclipping-item-factory.cpp;h=f6cf3771a9be6816a308062ea782f0486009f4c4;hb=c69a61d59c8d844bbe822c13ae14a80b8ddeaede;hp=50ec810099fc8f0c3fc47594ac6e65202b54fba7;hpb=804a3e6108cf706b7fcaa60c1652e9c5b972bb10;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/clipping/clipping-item-factory.cpp b/examples/clipping/clipping-item-factory.cpp index 50ec810..f6cf377 100644 --- a/examples/clipping/clipping-item-factory.cpp +++ b/examples/clipping/clipping-item-factory.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 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. @@ -23,6 +23,8 @@ #include #include #include +#include +#include using namespace Dali; using namespace Dali::Toolkit; @@ -102,7 +104,12 @@ unsigned int ClippingItemFactory::GetNumberOfItems() Actor ClippingItemFactory::NewItem( unsigned int itemId ) { // Create an image view for this item - ImageView actor = ImageView::New( IMAGE_PATHS[ itemId % NUM_IMAGES ] ); + Property::Map propertyMap; + propertyMap.Insert(Visual::Property::TYPE, Visual::IMAGE); + propertyMap.Insert(ImageVisual::Property::URL, IMAGE_PATHS[ itemId % NUM_IMAGES ] ); + propertyMap.Insert(DevelVisual::Property::FITTING_MODE, DevelVisual::FILL); + ImageView actor = ImageView::New(); + actor.SetProperty(Toolkit::ImageView::Property::IMAGE, propertyMap); // Add a border image child actor ImageView borderActor = ImageView::New(); @@ -112,7 +119,7 @@ Actor ClippingItemFactory::NewItem( unsigned int itemId ) borderActor.SetSizeModeFactor( Vector3( 2.0f * ITEM_BORDER_SIZE, 2.0f * ITEM_BORDER_SIZE, 0.0f ) ); borderActor.SetColorMode( USE_PARENT_COLOR ); borderActor.SetProperty( ImageView::Property::IMAGE, - Property::Map().Add( Visual::Property::TYPE, Visual::BORDER ) + Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::BORDER ) .Add( BorderVisual::Property::COLOR, Color::WHITE ) .Add( BorderVisual::Property::SIZE, ITEM_BORDER_SIZE ) .Add( BorderVisual::Property::ANTI_ALIASING, true ) );