2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
20 // Need to override adaptor classes for toolkit test harness, so include
21 // test harness headers before dali headers.
22 #include <dali-toolkit-test-suite-utils.h>
25 #include <dali-toolkit/dali-toolkit.h>
26 #include <dali/integration-api/events/touch-event-integ.h>
27 #include <dali/integration-api/events/pan-gesture-event.h>
30 using namespace Toolkit;
32 void utc_dali_toolkit_scroll_view_effect_startup(void)
34 test_return_value = TET_UNDEF;
37 void utc_dali_toolkit_scroll_view_effect_cleanup(void)
39 test_return_value = TET_PASS;
44 static bool gObjectCreatedCallBackCalled;
46 static void TestCallback(BaseHandle handle)
48 gObjectCreatedCallBackCalled = true;
51 const int MILLISECONDS_PER_SECOND = 1000;
52 const int RENDER_FRAME_INTERVAL = 16; ///< Duration of each frame in ms. (at approx 60FPS)
53 const int RENDER_ANIMATION_TEST_DURATION_MS = 1000; ///< 1000ms to test animation
54 const int RENDER_DELAY_SCROLL = 1000; ///< duration to wait for any scroll to complete.
57 * Simulate time passed by.
59 * @note this will always process at least 1 frame (1/60 sec)
61 * @param application Test application instance
62 * @param duration Time to pass in milliseconds.
63 * @return The actual time passed in milliseconds
65 int Wait(ToolkitTestApplication& application, int duration = 0)
69 for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++)
71 application.SendNotification();
72 application.Render(RENDER_FRAME_INTERVAL);
73 time += RENDER_FRAME_INTERVAL;
80 * Creates a Ruler that snaps to a specified grid size.
81 * If that grid size is 0.0 then this ruler does not
84 * @param[in] gridSize (optional) The grid size for the ruler,
85 * (Default = 0.0 i.e. no snapping)
86 * @return The ruler is returned.
88 RulerPtr CreateRuler(float gridSize = 0.0f)
90 if(gridSize <= Math::MACHINE_EPSILON_0)
92 return new DefaultRuler();
94 return new FixedRuler(gridSize);
99 static bool gOnScrollStartCalled; ///< Whether the OnScrollStart signal was invoked.
100 static bool gOnScrollUpdateCalled; ///< Whether the OnScrollUpdate signal was invoked.
101 static bool gOnScrollCompleteCalled; ///< Whether the OnScrollComplete signal was invoked.
102 static bool gOnScrollClampedCalled; ///< Whether the OnScrollClamped signal was invoked.
103 static bool gOnSnapStartCalled; ///< Whether the OnSnapStart signal was invoked.
104 static ClampState3 gLastClampPosition; ///< Clamping information from OnScrollClampedEvent.
105 static SnapType gLastSnapType; ///< Snaping information from SnapEvent.
106 static Vector3 gConstraintResult; ///< Result from constraint.
108 static ActorContainer gPages; ///< Keeps track of all the pages for applying effects.
110 static void ResetScrollCallbackResults()
112 gOnScrollStartCalled = false;
113 gOnScrollUpdateCalled = false;
114 gOnScrollCompleteCalled = false;
118 * Invoked when scrolling starts.
120 * @param[in] position The current scroll position.
122 static void OnScrollStart( const Vector3& position )
124 gOnScrollStartCalled = true;
128 * Invoked when scrolling updates (via dragging)
130 * @param[in] position The current scroll position.
132 static void OnScrollUpdate( const Vector3& position )
134 gOnScrollUpdateCalled = true;
138 * Invoked when scrolling finishes
140 * @param[in] position The current scroll position.
142 static void OnScrollComplete( const Vector3& position )
144 gOnScrollCompleteCalled = true;
148 * Invoked when scrolling clamped.
150 * @param[in] event The position/scale/rotation axes that were clamped.
152 static void OnScrollClamped( const ScrollView::ClampEvent& event )
154 gOnScrollClampedCalled = true;
155 gLastClampPosition = event.position;
159 * Invoked when a snap or flick started.
161 * @param[in] event The type of snap and the target position/scale/rotation.
163 static void OnSnapStart( const ScrollView::SnapEvent& event )
165 gOnSnapStartCalled = true;
166 gLastSnapType = event.type;
169 ScrollView SetupTestScrollView(int rows, int columns, Vector2 size)
171 ScrollView scrollView = ScrollView::New();
172 scrollView.SetSize(size);
173 scrollView.SetAnchorPoint(AnchorPoint::CENTER);
174 scrollView.SetParentOrigin(ParentOrigin::CENTER);
175 scrollView.ApplyConstraint( Constraint::New<Dali::Vector3>( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::EqualToConstraint() ) );
176 // Disable Refresh signal (TET environment cannot use adaptor's Timer)
177 scrollView.SetWrapMode(false);
178 scrollView.SetRefreshInterval(0);
179 scrollView.ScrollStartedSignal().Connect( &OnScrollStart );
180 scrollView.ScrollUpdatedSignal().Connect( &OnScrollUpdate );
181 scrollView.ScrollCompletedSignal().Connect( &OnScrollComplete );
182 Stage::GetCurrent().Add( scrollView );
183 RulerPtr rulerX = CreateRuler(size.width);
184 RulerPtr rulerY = CreateRuler(size.height);
187 rulerX->SetDomain(RulerDomain(0.0f, size.width * columns));
195 rulerY->SetDomain(RulerDomain(0.0f, size.width * rows));
202 scrollView.SetRulerX( rulerX );
203 scrollView.SetRulerY( rulerY );
204 Stage::GetCurrent().Add( scrollView );
206 Actor container = Actor::New();
207 container.SetParentOrigin(ParentOrigin::CENTER);
208 container.SetAnchorPoint(AnchorPoint::CENTER);
209 container.SetSize( size );
210 scrollView.Add( container );
211 container.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
214 for(int row = 0;row<rows;row++)
216 for(int column = 0;column<columns;column++)
218 Actor page = Actor::New();
219 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
220 page.SetParentOrigin( ParentOrigin::CENTER );
221 page.SetAnchorPoint( AnchorPoint::CENTER );
222 page.SetPosition( column * size.x, row * size.y );
225 gPages.push_back(page);
229 ResetScrollCallbackResults();
236 ResetScrollCallbackResults();
239 Actor AddActorToPage(Actor page, float x, float y, float cols, float rows)
241 Stage stage = Stage::GetCurrent();
242 Vector2 stageSize = stage.GetSize();
244 const float margin = 10.0f;
245 const Vector2 actorSize((stageSize.x / cols) - margin, (stageSize.y / rows) - margin);
247 Actor actor = Actor::New();
248 actor.SetParentOrigin( ParentOrigin::CENTER );
249 actor.SetAnchorPoint( AnchorPoint::CENTER );
251 Vector3 position( margin * 0.5f + (actorSize.x + margin) * x - stageSize.width * 0.5f,
252 margin * 0.5f + (actorSize.y + margin) * y - stageSize.height * 0.5f,
254 Vector3 positionEnd( margin * 0.5f + (actorSize.x + margin) * (x + cols) - stageSize.width * 0.5f - margin,
255 margin * 0.5f + (actorSize.y + margin) * (y + rows) - stageSize.height * 0.5f - margin,
257 Vector3 size(positionEnd - position);
258 actor.SetPosition( position + size * 0.5f);
259 actor.SetSize( positionEnd - position );
264 } // unnamed namespace
267 int UtcDaliScrollViewCustomEffectSetup(void)
269 tet_infoline(" UtcDaliScrollViewCustomEffectSetup");
271 ScrollViewCustomEffect effect;
273 DALI_TEST_CHECK( !effect );
275 BaseHandle handle = ScrollViewCustomEffect::New();
277 DALI_TEST_CHECK( handle );
279 effect = ScrollViewCustomEffect::DownCast(handle);
281 DALI_TEST_CHECK( effect );
286 int UtcDaliScrollViewCubeEffectSetup(void)
288 tet_infoline(" UtcDaliScrollViewCubeEffectSetup");
290 ScrollViewCubeEffect effect;
292 DALI_TEST_CHECK( !effect );
294 BaseHandle handle = ScrollViewCubeEffect::New();
296 DALI_TEST_CHECK( handle );
298 effect = ScrollViewCubeEffect::DownCast(handle);
300 DALI_TEST_CHECK( effect );
304 int UtcDaliScrollViewSpiralEffectSetup(void)
306 tet_infoline(" UtcDaliScrollViewSpiralEffectSetup");
308 ScrollViewPageSpiralEffect effect;
310 DALI_TEST_CHECK( !effect );
312 BaseHandle handle = ScrollViewPageSpiralEffect::New();
314 DALI_TEST_CHECK( handle );
316 effect = ScrollViewPageSpiralEffect::DownCast(handle);
318 DALI_TEST_CHECK( effect );
325 int UtcDaliScrollViewSlideEffectSetup(void)
327 tet_infoline(" UtcDaliScrollViewSlideEffectSetup");
329 ScrollViewSlideEffect effect;
331 DALI_TEST_CHECK( !effect );
333 BaseHandle handle = ScrollViewSlideEffect::New();
335 DALI_TEST_CHECK( handle );
337 effect = ScrollViewSlideEffect::DownCast(handle);
339 DALI_TEST_CHECK( effect );
343 int UtcDaliScrollViewTwistEffectSetup(void)
345 tet_infoline(" UtcDaliScrollViewTwistEffectSetup");
347 ScrollViewTwistEffect effect;
349 DALI_TEST_CHECK( !effect );
351 BaseHandle handle = ScrollViewTwistEffect::New();
353 DALI_TEST_CHECK( handle );
355 effect = ScrollViewTwistEffect::DownCast(handle);
357 DALI_TEST_CHECK( effect );
361 int UtcDaliScrollViewCubeEffectTest(void)
363 ToolkitTestApplication application;
364 tet_infoline(" UtcDaliScrollViewCubeEffectTest");
366 Vector2 size = Stage::GetCurrent().GetSize();
368 ScrollView scrollView = SetupTestScrollView(1, 3, size);
369 Actor page = gPages[1];
370 Wait(application, 500);
372 ScrollViewCubeEffect effect = ScrollViewCubeEffect::New();
373 scrollView.ApplyEffect(effect);
375 Actor actor = AddActorToPage(page, 0.5f, 0.5f, 3, 3);
377 Vector3 actorPrePosition = actor.GetCurrentPosition();
379 effect.ApplyToActor(actor, page, Vector3(-105.0f, 30.0f, -240.0f), Vector2(Math::PI * 0.5f, Math::PI * 0.5f), Vector2(0.25f, 0.25f) * size);
381 Actor actor2 = AddActorToPage(page, 0.5f, 0.5f, 3, 3);
382 effect.ApplyToActor(actor2, Vector3(-105.0f, 30.0f, -240.0f), Vector2(Math::PI * 0.5f, Math::PI * 0.5f), Vector2(0.25f, 0.25f) * size);
384 scrollView.ScrollTo(1);
385 while(!gOnScrollCompleteCalled)
389 // test that the first page has reached centre of screen
390 Vector3 actorPostPosition = actor.GetCurrentPosition();
391 // just check the actor has moved
392 DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
398 int UtcDaliScrollViewSpiralEffectTest(void)
400 ToolkitTestApplication application;
401 tet_infoline(" UtcDaliScrollViewSpiralEffectTest");
403 Vector2 size = Stage::GetCurrent().GetSize();
405 ScrollView scrollView = SetupTestScrollView(1, 3, size);
406 Actor testPage = gPages[1];
407 Wait(application, 500);
409 ScrollViewPageSpiralEffect effect = ScrollViewPageSpiralEffect::New();
410 scrollView.ApplyEffect(effect);
412 for(ActorIter pageIter = gPages.begin(); pageIter != gPages.end(); ++pageIter)
414 Actor page = *pageIter;
415 page.RemoveConstraints();
416 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
417 effect.ApplyToPage(page, Vector2(Math::PI_2, 0.0f));
421 scrollView.ScrollTo(1);
422 while(!gOnScrollCompleteCalled)
426 // test that the first page has reached centre of screen
427 Vector3 pagePos = testPage.GetCurrentPosition();
428 DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
435 int UtcDaliScrollViewSlideEffectTest(void)
437 ToolkitTestApplication application;
438 tet_infoline(" UtcDaliScrollViewSlideEffectTest");
440 Vector2 size = Stage::GetCurrent().GetSize();
441 Vector3 pageSize(size.x, size.y, 0.0f);
443 ScrollView scrollView = SetupTestScrollView(1, 3, size);
444 Actor testPage = gPages[1];
445 Wait(application, 500);
447 ScrollViewSlideEffect effect = ScrollViewSlideEffect::New();
448 effect.SetDelayReferenceOffset(pageSize * 0.25);
449 DALI_TEST_EQUALS(effect.GetDelayReferenceOffset(), pageSize * 0.25, Math::MACHINE_EPSILON_0, TEST_LOCATION);
450 effect.SetMaxDelayDuration(0.5f);
451 DALI_TEST_EQUALS(effect.GetMaxDelayDuration(), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION);
452 effect.SetSlideDirection(false);
453 DALI_TEST_CHECK(!effect.GetSlideDirection());
455 scrollView.ApplyEffect(effect);
457 Actor actor = AddActorToPage(testPage, 0.5f, 0.5f, 3, 3);
459 Vector3 actorPrePosition = actor.GetCurrentPosition();
461 effect.ApplyToActor(actor, 0.0f, 0.5f);
463 scrollView.ScrollTo(1);
464 while(!gOnScrollCompleteCalled)
468 // test that the first page has reached centre of screen
469 Vector3 actorPostPosition = actor.GetCurrentPosition();
470 // just check the actor has moved
471 DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
476 int UtcDaliScrollViewTwistEffectTest(void)
478 ToolkitTestApplication application;
479 tet_infoline(" UtcDaliScrollViewTwistEffectTest");
481 Vector2 size = Stage::GetCurrent().GetSize();
483 ScrollView scrollView = SetupTestScrollView(1, 3, size);
484 Actor testPage = gPages[1];
485 Wait(application, 500);
487 ScrollViewTwistEffect effect = ScrollViewTwistEffect::New();
488 float shrinkDist = 0.2f;
489 effect.SetMinimumDistanceForShrink(shrinkDist);
490 DALI_TEST_CHECK((shrinkDist - effect.GetMinimumDistanceForShrink()) < Math::MACHINE_EPSILON_0);
491 effect.EnableEffect(true);
492 scrollView.ApplyEffect(effect);
494 Actor actor = AddActorToPage(testPage, 0.5f, 0.5f, 3, 3);
496 Vector3 actorPrePosition = actor.GetCurrentPosition();
498 effect.ApplyToActor( actor,
500 Vector2(Math::PI_2, Math::PI_2),
503 scrollView.ScrollTo(1);
504 while(!gOnScrollCompleteCalled)
508 // test that the first page has reached centre of screen
509 Vector3 actorPostPosition = actor.GetCurrentPosition();
510 // just check the actor has moved
511 DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
516 int UtcDaliScrollViewCustomEffectTest(void)
518 ToolkitTestApplication application;
519 tet_infoline(" UtcDaliScrollViewCustomEffectTest");
521 Vector2 size = Stage::GetCurrent().GetSize();
522 Vector3 pageSize(size.x, size.y, 0.0f);
524 ScrollView scrollView = SetupTestScrollView(1, 3, size);
525 Actor testPage = gPages[1];
526 Wait(application, 500);
527 Vector3 pageStartPos, pagePos;
528 pageStartPos = pagePos = testPage.GetCurrentPosition();
529 //scrollView.RemoveConstraintsFromChildren();
531 ScrollViewCustomEffect effect = ScrollViewCustomEffect::DownCast(scrollView.ApplyEffect(ScrollView::PageEffectCarousel));
533 for(ActorIter pageIter = gPages.begin(); pageIter != gPages.end(); ++pageIter)
535 Actor page = *pageIter;
536 page.RemoveConstraints();
537 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
538 effect.ApplyToPage(page, pageSize);
541 pagePos = testPage.GetCurrentPosition();
542 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
544 scrollView.ScrollTo(1);
545 while(!gOnScrollCompleteCalled)
549 ResetScrollCallbackResults();
550 // test that the first page has reached centre of screen
551 pagePos = testPage.GetCurrentPosition();
552 DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
554 // scroll back to page 0
555 scrollView.ScrollTo(0);
556 while(!gOnScrollCompleteCalled)
560 ResetScrollCallbackResults();
561 pagePos = testPage.GetCurrentPosition();
562 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
564 scrollView.RemoveEffect(effect);
566 effect = ScrollViewCustomEffect::New();
567 effect.SetPageTranslation(Vector3(20.0f, 20.0f, 5.0f));
568 effect.SetPageTranslation(Vector3(20.0f, 20.0f, 5.0f), Vector3(20.0f, 20.0f, -5.0f));
569 effect.SetPageTranslationIn(Vector3(20.0f, 20.0f, 5.0f));
570 effect.SetPageTranslationOut(Vector3(20.0f, 20.0f, -5.0f));
571 effect.SetPageTranslation(Vector3(20.0f, 0.0f, 0.0f));
572 effect.SetSwingAngle(Math::PI, Vector3::YAXIS);
573 effect.SetPageSpacing(Vector2(20.0f, 20.0f));
574 scrollView.ApplyEffect(effect);
576 for(ActorIter pageIter = gPages.begin(); pageIter != gPages.end(); ++pageIter)
578 Actor page = *pageIter;
579 page.RemoveConstraints();
580 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
581 effect.ApplyToPage(page, pageSize);
584 pagePos = testPage.GetCurrentPosition();
585 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
587 scrollView.ScrollTo(1);
588 while(!gOnScrollCompleteCalled)
592 ResetScrollCallbackResults();
593 // test that the first page has reached centre of screen
594 pagePos = testPage.GetCurrentPosition();
595 DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
597 // scroll back to page 0
598 scrollView.ScrollTo(0);
599 while(!gOnScrollCompleteCalled)
603 ResetScrollCallbackResults();
604 pagePos = testPage.GetCurrentPosition();
605 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
607 scrollView.RemoveEffect(effect);
608 effect = ScrollViewCustomEffect::New();
609 effect.SetSwingAngle(Math::PI, Vector3::YAXIS);
610 effect.SetSwingAnchor(AnchorPoint::CENTER_LEFT);
611 effect.SetPageTranslation(Vector3(size.x, size.y, 0));
612 effect.SetOpacityThreshold(0.66f);
613 scrollView.ApplyEffect(effect);
615 for(ActorIter pageIter = gPages.begin(); pageIter != gPages.end(); ++pageIter)
617 Actor page = *pageIter;
618 page.RemoveConstraints();
619 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
620 effect.ApplyToPage(page, pageSize);
624 scrollView.ScrollTo(1);
625 while(!gOnScrollCompleteCalled)
629 ResetScrollCallbackResults();
630 // test that the first page has reached centre of screen
631 pagePos = testPage.GetCurrentPosition();
632 DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
634 // scroll back to page 0
635 scrollView.ScrollTo(0);
636 while(!gOnScrollCompleteCalled)
640 ResetScrollCallbackResults();
641 pagePos = testPage.GetCurrentPosition();
642 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
643 scrollView.RemoveEffect(effect);
646 effect.SetPageTranslateAlphaFunction(AlphaFunctions::Linear);
647 effect.SetPageTranslateAlphaFunction(AlphaFunctions::Linear, AlphaFunctions::Linear);
648 effect.SetPageTranslateAlphaFunctionIn(AlphaFunctions::Linear);
649 effect.SetPageTranslateAlphaFunctionOut(AlphaFunctions::Linear);
650 effect.SetGlobalPageRotation(Math::PI, Vector3::YAXIS);
651 effect.SetAngledOriginPageRotation(Vector3(Math::PI, Math::PI, 0.0f));
652 effect.SetGlobalPageRotation(Math::PI, Vector3::YAXIS, Math::PI, Vector3::YAXIS);
653 effect.SetGlobalPageRotationIn(Math::PI, Vector3::YAXIS);
654 effect.SetGlobalPageRotationOut(Math::PI, Vector3::YAXIS);
655 effect.SetGlobalPageRotationOrigin(Vector3::ZERO);
656 effect.SetGlobalPageRotationOrigin(Vector3::ZERO, Vector3::ZERO);
657 effect.SetGlobalPageRotationOriginIn(Vector3::ZERO);
658 effect.SetGlobalPageRotationOriginOut(Vector3::ZERO);
659 effect.SetSwingAngle(Math::PI, Vector3::YAXIS);
660 effect.SetSwingAngle(Math::PI, Vector3::YAXIS, Math::PI, Vector3::YAXIS);
661 effect.SetSwingAngleIn(Math::PI, Vector3::YAXIS);
662 effect.SetSwingAngleOut(Math::PI, Vector3::YAXIS);
663 effect.SetSwingAngleAlphaFunction(AlphaFunctions::Linear);
664 effect.SetSwingAngleAlphaFunction(AlphaFunctions::Linear, AlphaFunctions::Linear);
665 effect.SetSwingAngleAlphaFunctionIn(AlphaFunctions::Linear);
666 effect.SetSwingAngleAlphaFunctionOut(AlphaFunctions::Linear);
667 effect.SetSwingAnchor(AnchorPoint::CENTER, AnchorPoint::CENTER_LEFT);
668 effect.SetSwingAnchorIn(AnchorPoint::CENTER);
669 effect.SetSwingAnchorOut(AnchorPoint::CENTER);
670 effect.SetSwingAnchorAlphaFunction(AlphaFunctions::Linear);
671 effect.SetSwingAnchorAlphaFunction(AlphaFunctions::Linear, AlphaFunctions::Linear);
672 effect.SetSwingAnchorAlphaFunctionIn(AlphaFunctions::Linear);
673 effect.SetSwingAnchorAlphaFunctionOut(AlphaFunctions::Linear);
674 effect.SetOpacityThreshold(0.5f);
675 effect.SetOpacityThreshold(0.5f, 0.5f);
676 effect.SetOpacityThresholdIn(0.5f);
677 effect.SetOpacityThresholdOut(0.5f);
678 effect.SetOpacityAlphaFunction(AlphaFunctions::Linear);
679 effect.SetOpacityAlphaFunction(AlphaFunctions::Linear, AlphaFunctions::Linear);
680 effect.SetOpacityAlphaFunctionIn(AlphaFunctions::Linear);
681 effect.SetOpacityAlphaFunctionOut(AlphaFunctions::Linear);