-const char * const EFFECT_HIGHP_IMAGE( DALI_IMAGE_DIR "icon-highp.png" );
-const char * const EFFECT_MEDIUMP_IMAGE( DALI_IMAGE_DIR "icon-mediump.png" );
-const char * const PLAY_ICON( DALI_IMAGE_DIR "icon-play.png" );
-const char * const STOP_ICON( DALI_IMAGE_DIR "icon-stop.png" );
+const char * const EFFECT_HIGHP_IMAGE( DEMO_IMAGE_DIR "icon-highp.png" );
+const char * const EFFECT_HIGHP_IMAGE_SELECTED( DEMO_IMAGE_DIR "icon-highp-selected.png" );
+const char * const EFFECT_MEDIUMP_IMAGE( DEMO_IMAGE_DIR "icon-mediump.png" );
+const char * const EFFECT_MEDIUMP_IMAGE_SELECTED( DEMO_IMAGE_DIR "icon-mediump-selected.png" );
+const char * const PLAY_ICON( DEMO_IMAGE_DIR "icon-play.png" );
+const char * const PLAY_ICON_SELECTED( DEMO_IMAGE_DIR "icon-play-selected.png" );
+const char * const STOP_ICON( DEMO_IMAGE_DIR "icon-stop.png" );
+const char * const STOP_ICON_SELECTED( DEMO_IMAGE_DIR "icon-stop-selected.png" );
- DALI_IMAGE_DIR "gallery-large-1.jpg",
- DALI_IMAGE_DIR "gallery-large-2.jpg",
- DALI_IMAGE_DIR "gallery-large-3.jpg",
- DALI_IMAGE_DIR "gallery-large-4.jpg",
- DALI_IMAGE_DIR "gallery-large-5.jpg",
- DALI_IMAGE_DIR "gallery-large-6.jpg",
- DALI_IMAGE_DIR "gallery-large-7.jpg",
- DALI_IMAGE_DIR "gallery-large-8.jpg",
- DALI_IMAGE_DIR "gallery-large-9.jpg",
- DALI_IMAGE_DIR "gallery-large-10.jpg",
- DALI_IMAGE_DIR "gallery-large-11.jpg",
- DALI_IMAGE_DIR "gallery-large-12.jpg",
- DALI_IMAGE_DIR "gallery-large-13.jpg",
- DALI_IMAGE_DIR "gallery-large-14.jpg",
- DALI_IMAGE_DIR "gallery-large-15.jpg",
- DALI_IMAGE_DIR "gallery-large-16.jpg",
- DALI_IMAGE_DIR "gallery-large-17.jpg",
- DALI_IMAGE_DIR "gallery-large-18.jpg",
- DALI_IMAGE_DIR "gallery-large-19.jpg",
- DALI_IMAGE_DIR "gallery-large-20.jpg",
- DALI_IMAGE_DIR "gallery-large-21.jpg",
+ DEMO_IMAGE_DIR "gallery-large-1.jpg",
+ DEMO_IMAGE_DIR "gallery-large-2.jpg",
+ DEMO_IMAGE_DIR "gallery-large-3.jpg",
+ DEMO_IMAGE_DIR "gallery-large-4.jpg",
+ DEMO_IMAGE_DIR "gallery-large-5.jpg",
+ DEMO_IMAGE_DIR "gallery-large-6.jpg",
+ DEMO_IMAGE_DIR "gallery-large-7.jpg",
+ DEMO_IMAGE_DIR "gallery-large-8.jpg",
+ DEMO_IMAGE_DIR "gallery-large-9.jpg",
+ DEMO_IMAGE_DIR "gallery-large-10.jpg",
+ DEMO_IMAGE_DIR "gallery-large-11.jpg",
+ DEMO_IMAGE_DIR "gallery-large-12.jpg",
+ DEMO_IMAGE_DIR "gallery-large-13.jpg",
+ DEMO_IMAGE_DIR "gallery-large-14.jpg",
+ DEMO_IMAGE_DIR "gallery-large-15.jpg",
+ DEMO_IMAGE_DIR "gallery-large-16.jpg",
+ DEMO_IMAGE_DIR "gallery-large-17.jpg",
+ DEMO_IMAGE_DIR "gallery-large-18.jpg",
+ DEMO_IMAGE_DIR "gallery-large-19.jpg",
+ DEMO_IMAGE_DIR "gallery-large-20.jpg",
+ DEMO_IMAGE_DIR "gallery-large-21.jpg",
- ImageAttributes attributes;
- attributes.SetSize( stageSize.x, stageSize.y );
- attributes.SetFilterMode( ImageAttributes::BoxThenLinear );
- attributes.SetScalingMode( ImageAttributes::ScaleToFill );
- return ResourceImage::New( imagePath, attributes );
+ Toolkit::ImageView imageView = Toolkit::ImageView::New();
+ Property::Map map;
+ map[Toolkit::Visual::Property::TYPE] = Toolkit::Visual::IMAGE;
+ map[Toolkit::ImageVisual::Property::URL] = imagePath;
+ map[Toolkit::ImageVisual::Property::DESIRED_WIDTH] = stageSize.x;
+ map[Toolkit::ImageVisual::Property::DESIRED_HEIGHT] = stageSize.y;
+ map[Toolkit::ImageVisual::Property::FITTING_MODE] = FittingMode::SCALE_TO_FILL;
+ map[Toolkit::ImageVisual::Property::SAMPLING_MODE] = SamplingMode::BOX_THEN_LINEAR;
+ map[Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING] = true;
+ imageView.SetProperty( Toolkit::ImageView::Property::IMAGE, map );
+
+ return imageView;
Stage::GetCurrent().KeyEventSignal().Connect(this, &DissolveEffectApp::OnKeyEvent);
// Creates a default view with a default tool bar, the view is added to the stage.
mContent = DemoHelper::CreateView( application, mView,mToolBar, "", TOOLBAR_IMAGE, "" );
// Add an effect-changing button on the right of the tool bar.
Stage::GetCurrent().KeyEventSignal().Connect(this, &DissolveEffectApp::OnKeyEvent);
// Creates a default view with a default tool bar, the view is added to the stage.
mContent = DemoHelper::CreateView( application, mView,mToolBar, "", TOOLBAR_IMAGE, "" );
// Add an effect-changing button on the right of the tool bar.
mEffectChangeButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnEffectButtonClicked );
mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
mEffectChangeButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnEffectButtonClicked );
mToolBar.AddControl( mEffectChangeButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalRight, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
mPlayStopButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnSildeshowButtonClicked );
mToolBar.AddControl( mPlayStopButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING );
mPlayStopButton.ClickedSignal().Connect( this, &DissolveEffectApp::OnSildeshowButtonClicked );
mToolBar.AddControl( mPlayStopButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING );
mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
mParent.Add( mCurrentImage );
mPanGestureDetector.Attach( mCurrentImage );
mCurrentImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
mCurrentImage.SetSizeScalePolicy( SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
mParent.Add( mCurrentImage );
mPanGestureDetector.Attach( mCurrentImage );
- mCurrentImageEffect.SetCentralLine(position,displacement);
- mCurrentImageEffect.SetDistortion(0.0f);
- mCurrentImage.SetShaderEffect(mCurrentImageEffect);
- mAnimation.AnimateTo( Property(mCurrentImageEffect, mCurrentImageEffect.GetDistortionPropertyName()), 1.0f, AlphaFunctions::Linear );
+ Dali::Toolkit::DissolveEffectSetCentralLine( mCurrentImage, position, displacement, 0.0f );
+ mCurrentImage.SetProperty( Toolkit::ImageView::Property::IMAGE, mDissolveEffect );
+ mAnimation.AnimateTo( Property( mCurrentImage, "uPercentage" ), 1.0f, AlphaFunction::LINEAR );
- mNextImageEffect.SetCentralLine(position,-displacement);
- mNextImageEffect.SetDistortion(1.0f);
- mNextImage.SetShaderEffect(mNextImageEffect);
- mAnimation.AnimateTo( Property(mNextImageEffect, mNextImageEffect.GetDistortionPropertyName()), 0.0f, AlphaFunctions::Linear );
+ Dali::Toolkit::DissolveEffectSetCentralLine( mNextImage, position, displacement, 1.0f );
+ mNextImage.SetProperty( Toolkit::ImageView::Property::IMAGE, mDissolveEffect );
+ mAnimation.AnimateTo( Property( mNextImage, "uPercentage" ), 0.0f, AlphaFunction::LINEAR );