Remove last usage of SetImage( ResourceImage ) from examples 88/115388/1
authorNick Holland <nick.holland@partner.samsung.com>
Fri, 17 Feb 2017 15:10:34 +0000 (15:10 +0000)
committerNick Holland <nick.holland@partner.samsung.com>
Fri, 17 Feb 2017 15:10:34 +0000 (15:10 +0000)
Change-Id: If2cb8f802e055f1afcea3bbfefd774872a8f90e6

examples/motion-blur/motion-blur-example.cpp
examples/styling/styling-application.cpp
shared/utility.h

index e002e73..9c80f5c 100644 (file)
@@ -37,20 +37,8 @@ namespace // unnamed namespace
 // Demo setup parameters
 //
 
-//#define MULTIPLE_MOTION_BLURRED_ACTORS
-#ifndef MULTIPLE_MOTION_BLURRED_ACTORS
-
 const float MOTION_BLUR_ACTOR_WIDTH = 256;                                          // actor size on screen
 const float MOTION_BLUR_ACTOR_HEIGHT = 256;                                         // ""
-
-#else //#ifndef MULTIPLE_MOTION_BLURRED_ACTORS
-
-const float MOTION_BLUR_ACTOR_WIDTH = 150;                                          // actor size on screen
-const float MOTION_BLUR_ACTOR_HEIGHT = 112;                                         // ""
-
-#endif //#ifndef MULTIPLE_MOTION_BLURRED_ACTORS
-
-
 const unsigned int MOTION_BLUR_NUM_SAMPLES = 8;
 
 const int MOTION_BLUR_NUM_ACTOR_IMAGES = 5;
@@ -230,71 +218,6 @@ public:
     // set actor shader to the blur one
     Toolkit::SetMotionBlurProperties( mMotionBlurImageView, MOTION_BLUR_NUM_SAMPLES );
 
-
-#ifdef MULTIPLE_MOTION_BLURRED_ACTORS
-
-    ///////////////////////////////////////////////////////
-    //
-    // Motion blurred actor 2
-    //
-
-    mMotionBlurImageView2 = ImageView::New(image);
-    mMotionBlurImageView2.SetParentOrigin( ParentOrigin::CENTER );
-    mMotionBlurImageView2.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);
-    mMotionBlurImageView2.SetPosition(mMotionBlurActorSize.x * 1.1f, 0.0f);
-    mMotionBlurImageView.Add( mMotionBlurImageView2 );
-
-    // set actor shader to the blur one
-    Toolkit::SetMotionBlurProperties( mMotionBlurImageView2, MOTION_BLUR_NUM_SAMPLES );
-    mMotionBlurImageView2.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionBlurEffect );
-
-
-    ///////////////////////////////////////////////////////
-    //
-    // Motion blurred actor 3
-    //
-
-    mMotionBlurImageView3 = ImageView::New(image);
-    mMotionBlurImageView3.SetParentOrigin( ParentOrigin::CENTER );
-    mMotionBlurImageView3.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);
-    mMotionBlurImageView3.SetPosition(-mMotionBlurActorSize.x * 1.1f, 0.0f);
-    mMotionBlurImageView.Add( mMotionBlurImageView3 );
-
-    // set actor shader to the blur one
-    Toolkit::SetMotionBlurProperties( mMotionBlurImageView3, MOTION_BLUR_NUM_SAMPLES );
-    mMotionBlurImageView3.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionBlurEffect );
-
-
-    ///////////////////////////////////////////////////////
-    //
-    // Motion blurred actor 4
-    //
-
-    mMotionBlurImageView4 = ImageView::New(image);
-    mMotionBlurImageView4.SetParentOrigin( ParentOrigin::CENTER );
-    mMotionBlurImageView4.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);
-    mMotionBlurImageView4.SetPosition(0.0f, mMotionBlurActorSize.y * 1.1f);
-    mMotionBlurImageView.Add( mMotionBlurImageView4 );
-
-    // set actor shader to the blur one
-    Toolkit::SetMotionBlurProperties( mMotionBlurImageView4, MOTION_BLUR_NUM_SAMPLES );
-    mMotionBlurImageView4.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionBlurEffect );
-
-    ///////////////////////////////////////////////////////
-    //
-    // Motion blurred actor 5
-    //
-
-    mMotionBlurImageView5 = ImageView::New(image);
-    mMotionBlurImageView5.SetParentOrigin( ParentOrigin::CENTER );
-    mMotionBlurImageView5.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);
-    mMotionBlurImageView5.SetPosition(0.0f, -mMotionBlurActorSize.y * 1.1f);
-    mMotionBlurImageView.Add( mMotionBlurImageView5 );
-
-    // set actor shader to the blur one
-    Toolkit::SetMotionBlurProperties( mMotionBlurImageView5, MOTION_BLUR_NUM_SAMPLES );
-    mMotionBlurImageView5.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionBlurEffect );
-#endif //#ifdef MULTIPLE_MOTION_BLURRED_ACTORS
   }
 
   void Rotate( DeviceOrientation orientation )
@@ -494,12 +417,6 @@ public:
     }
     SetImageFittedInBox( mMotionBlurImageView, mMotionBlurEffect, MOTION_BLUR_ACTOR_IMAGES[mCurrentImage], mMotionBlurActorSize.x, mMotionBlurActorSize.y );
 
-#ifdef MULTIPLE_MOTION_BLURRED_ACTORS
-    mMotionBlurImageView2.SetImage(blurImage);
-    mMotionBlurImageView3.SetImage(blurImage);
-    mMotionBlurImageView4.SetImage(blurImage);
-    mMotionBlurImageView5.SetImage(blurImage);
-#endif
   }
 
 
@@ -517,13 +434,6 @@ private:
   ImageView mMotionBlurImageView;
   Size mMotionBlurActorSize;
 
-#ifdef MULTIPLE_MOTION_BLURRED_ACTORS
-  ImageView mMotionBlurImageView2;
-  ImageView mMotionBlurImageView3;
-  ImageView mMotionBlurImageView4;
-  ImageView mMotionBlurImageView5;
-#endif //#ifdef MULTIPLE_MOTION_BLURRED_ACTORS
-
   // animate actor to position where user taps screen
   Animation mActorTapMovementAnimation;
 
index b5b876e..2a4d7b6 100644 (file)
@@ -178,7 +178,7 @@ void StylingApplication::Create( Application& application )
   for( int i=0; i<3; ++i )
   {
     std::ostringstream thumbnailName; thumbnailName << "thumbnail" << i+1;
-    ImageView image = ImageView::New( ResourceImage::New( images[i] ) );
+    ImageView image = ImageView::New( images[i] );
     image.SetName( thumbnailName.str() );
     image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
 
index 283ae33..76a814b 100644 (file)
@@ -36,17 +36,6 @@ Dali::PixelData LoadPixelData( const char* imagePath,
   return loader.GetPixelData();
 }
 
-/**
- * @deprecated, dont use this anymore
- */
-Dali::Image LoadImage( const char* imagePath,
-                       Dali::ImageDimensions size = Dali::ImageDimensions(),
-                       Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT,
-                       Dali::SamplingMode::Type samplingMode = Dali::SamplingMode::DEFAULT )
-{
-  return Dali::ResourceImage::New( imagePath, size, fittingMode, samplingMode );
-}
-
 Dali::Texture LoadTexture( const char* imagePath,
                            Dali::ImageDimensions size = Dali::ImageDimensions(),
                            Dali::FittingMode::Type fittingMode = Dali::FittingMode::DEFAULT,
@@ -62,23 +51,6 @@ Dali::Texture LoadTexture( const char* imagePath,
   return texture;
 }
 
-/**
- * @brief Load an bitmap resource.
- * @deprecated, dont use this anymore
- *
- * If it is required to scaled-down to no more than the stage dimensions,
- * uses image scaling mode FittingMode::SCALE_TO_FILL to resize the image at
- * load time to cover the entire stage with pixels with no borders,
- * and filter mode BOX_THEN_LINEAR to sample the image with
- * maximum quality.
- */
-
-Dali::Image LoadStageFillingImage( const char* imagePath )
-{
-  Dali::Vector2 stageSize = Dali::Stage::GetCurrent().GetSize();
-  return LoadImage( imagePath, Dali::ImageDimensions( stageSize.x, stageSize.y ), Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::BOX_THEN_LINEAR );
-}
-
 Dali::Texture LoadStageFillingTexture( const char* imagePath )
 {
   Dali::Vector2 stageSize = Dali::Stage::GetCurrent().GetSize();