X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fscroll-view%2Fscroll-view-example.cpp;h=20bff950d527adc1f5948e780613c468bbdb71c6;hb=refs%2Fchanges%2F13%2F78913%2F2;hp=1a8d12aeb6e191e536e3de00e22c5e738f8a3fcd;hpb=f3d4602ba67f66b6cedd9721765895e673bdb9b8;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/scroll-view/scroll-view-example.cpp b/examples/scroll-view/scroll-view-example.cpp index 1a8d12a..20bff95 100644 --- a/examples/scroll-view/scroll-view-example.cpp +++ b/examples/scroll-view/scroll-view-example.cpp @@ -450,11 +450,18 @@ private: * @param[in] width the width of the image in texels * @param[in] height the height of the image in texels. */ - ImageView CreateImage( const std::string& filename, unsigned int width = IMAGE_THUMBNAIL_WIDTH, unsigned int height = IMAGE_THUMBNAIL_HEIGHT ) + ImageView CreateImage( const std::string& filename, int width = IMAGE_THUMBNAIL_WIDTH, int height = IMAGE_THUMBNAIL_HEIGHT ) { - Image img = ResourceImage::New(filename, ImageDimensions( width, height ), Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::BOX_THEN_LINEAR ); + ImageView actor = ImageView::New(); + Property::Map map; + map["rendererType"] = "image"; + map["url"] = filename; + map["desiredWidth"] = width; + map["desiredHeight"] = height; + map["fittingMode"] = "SCALE_TO_FILL"; + map["samplingMode"] = "BOX_THEN_LINEAR"; + actor.SetProperty( ImageView::Property::IMAGE, map ); - ImageView actor = ImageView::New(img); actor.SetName( filename ); actor.SetParentOrigin(ParentOrigin::CENTER); actor.SetAnchorPoint(AnchorPoint::CENTER); @@ -487,7 +494,7 @@ private: * Upon Touching an image (Release), make it spin * (provided we're not scrolling). * @param[in] actor The actor touched - * @param[in] event The TouchEvent. + * @param[in] event The touch information. */ bool OnTouchImage( Actor actor, const TouchData& event ) {