- case PageCarouselEffect:
- case PageCubeEffect:
- case PageSpiralEffect:
- case PageWaveEffect:
- {
- Dali::Path path = Dali::Path::New();
- Dali::Property::Array points;
- points.resize(3);
- Dali::Property::Array controlPoints;
- controlPoints.resize(4);
- Vector3 forward;
- if( mEffectMode == PageCarouselEffect)
- {
-
- points[0] = Vector3( stageSize.x*0.75, 0.0f, -stageSize.x*0.75f);
- points[1] = Vector3( 0.0f, 0.0f, 0.0f );
- points[2] = Vector3( -stageSize.x*0.75f, 0.0f, -stageSize.x*0.75f);
- path.SetProperty( Path::Property::POINTS, points );
-
- controlPoints[0] = Vector3( stageSize.x*0.5f, 0.0f, 0.0f );
- controlPoints[1] = Vector3( stageSize.x*0.5f, 0.0f, 0.0f );
- controlPoints[2] = Vector3(-stageSize.x*0.5f, 0.0f, 0.0f );
- controlPoints[3] = Vector3(-stageSize.x*0.5f, 0.0f, 0.0f );
- path.SetProperty( Path::Property::CONTROL_POINTS, controlPoints );
-
- forward = Vector3::ZERO;
- }
- else if( mEffectMode == PageCubeEffect)
- {
- points[0] = Vector3( stageSize.x*0.5, 0.0f, stageSize.x*0.5f);
- points[1] = Vector3( 0.0f, 0.0f, 0.0f );
- points[2] = Vector3( -stageSize.x*0.5f, 0.0f, stageSize.x*0.5f);
- path.SetProperty( Path::Property::POINTS, points );
-
- controlPoints[0] = Vector3( stageSize.x*0.5f, 0.0f, stageSize.x*0.3f );
- controlPoints[1] = Vector3( stageSize.x*0.3f, 0.0f, 0.0f );
- controlPoints[2] = Vector3(-stageSize.x*0.3f, 0.0f, 0.0f );
- controlPoints[3] = Vector3(-stageSize.x*0.5f, 0.0f, stageSize.x*0.3f );
- path.SetProperty( Path::Property::CONTROL_POINTS, controlPoints );
-
- forward = Vector3(-1.0f,0.0f,0.0f);
- }
- else if( mEffectMode == PageSpiralEffect)
- {
- points[0] = Vector3( stageSize.x*0.5, 0.0f, -stageSize.x*0.5f);
- points[1] = Vector3( 0.0f, 0.0f, 0.0f );
- points[2] = Vector3( -stageSize.x*0.5f, 0.0f, -stageSize.x*0.5f);
- path.SetProperty( Path::Property::POINTS, points );
-
- controlPoints[0] = Vector3( stageSize.x*0.5f, 0.0f, 0.0f );
- controlPoints[1] = Vector3( stageSize.x*0.5f, 0.0f, 0.0f );
- controlPoints[2] = Vector3(-stageSize.x*0.5f, 0.0f, 0.0f );
- controlPoints[3] = Vector3(-stageSize.x*0.5f, 0.0f, 0.0f );
- path.SetProperty( Path::Property::CONTROL_POINTS, controlPoints );
-
- forward = Vector3(-1.0f,0.0f,0.0f);
- }
- else if( mEffectMode == PageWaveEffect)
- {
- points[0] = Vector3( stageSize.x, 0.0f, -stageSize.x);
- points[1] = Vector3( 0.0f, 0.0f, 0.0f );
- points[2] = Vector3( -stageSize.x, 0.0f, -stageSize.x);
- path.SetProperty( Path::Property::POINTS, points );
-
- controlPoints[0] = Vector3( 0.0f, 0.0f, -stageSize.x );
- controlPoints[1] = Vector3( stageSize.x*0.5f, 0.0f, 0.0f );
- controlPoints[2] = Vector3( -stageSize.x*0.5f, 0.0f, 0.0f);
- controlPoints[3] = Vector3(0.0f, 0.0f,-stageSize.x );
- path.SetProperty( Path::Property::CONTROL_POINTS, controlPoints );
-
- forward = Vector3(-1.0f,0.0f,0.0f);
- }
-
- mScrollViewEffect = ScrollViewPagePathEffect::New(path, forward,Toolkit::ScrollView::Property::SCROLL_FINAL_X, Vector3(stageSize.x,stageSize.y,0.0f),PAGE_COLUMNS);
- mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
- mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
- mScrollView.SetScrollSnapAlphaFunction(AlphaFunction::EASE_OUT);
- mScrollView.SetScrollFlickAlphaFunction(AlphaFunction::EASE_OUT);
- mScrollView.RemoveConstraintsFromChildren();
-
- rulerX = CreateRuler(snap ? stageSize.width * 0.5f : 0.0f);
- if( wrap )
- {
- rulerX->SetDomain(RulerDomain(0.0f, stageSize.x * 0.5f * PAGE_COLUMNS, !wrap));
- }
- else
- {
- rulerX->SetDomain(RulerDomain(0.0f, stageSize.x*0.5f* (PAGE_COLUMNS+1), !wrap));
- }
-
- break;
- }