// 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;
// 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 )
}
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
}
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;
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,
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();