/*
- * 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.
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/public-api/visuals/border-visual-properties.h>
#include <dali-toolkit/public-api/visuals/visual-properties.h>
+#include <dali-toolkit/public-api/visuals/image-visual-properties.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
using namespace Dali;
using namespace Dali::Toolkit;
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();
/*
- * 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.
#include <dali/dali.h>
#include <dali-toolkit/dali-toolkit.h>
#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
+#include <dali-toolkit/devel-api/visuals/visual-properties-devel.h>
using namespace Dali;
using namespace Dali::Toolkit;
virtual Actor 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(Toolkit::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 );
actor.SetZ( 0.0f );
actor.SetPosition( INITIAL_OFFSCREEN_POSITION );