2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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.
21 // Need to override adaptor classes for toolkit test harness, so include
22 // test harness headers before dali headers.
23 #include <dali-toolkit-test-suite-utils.h>
26 #include <dali-toolkit/dali-toolkit.h>
27 #include <dali/integration-api/events/touch-event-integ.h>
28 #include <dali/integration-api/events/pan-gesture-event.h>
31 using namespace Toolkit;
33 void utc_dali_toolkit_scroll_view_effect_startup(void)
35 test_return_value = TET_UNDEF;
38 void utc_dali_toolkit_scroll_view_effect_cleanup(void)
40 test_return_value = TET_PASS;
45 static bool gObjectCreatedCallBackCalled;
47 static void TestCallback(BaseHandle handle)
49 gObjectCreatedCallBackCalled = true;
52 const int MILLISECONDS_PER_SECOND = 1000;
53 const int RENDER_FRAME_INTERVAL = 16; ///< Duration of each frame in ms. (at approx 60FPS)
54 const int RENDER_ANIMATION_TEST_DURATION_MS = 1000; ///< 1000ms to test animation
55 const int RENDER_DELAY_SCROLL = 1000; ///< duration to wait for any scroll to complete.
58 * Simulate time passed by.
60 * @note this will always process at least 1 frame (1/60 sec)
62 * @param application Test application instance
63 * @param duration Time to pass in milliseconds.
64 * @return The actual time passed in milliseconds
66 int Wait(ToolkitTestApplication& application, int duration = 0)
70 for(int i = 0; i <= ( duration / RENDER_FRAME_INTERVAL); i++)
72 application.SendNotification();
73 application.Render(RENDER_FRAME_INTERVAL);
74 time += RENDER_FRAME_INTERVAL;
81 * Creates a Ruler that snaps to a specified grid size.
82 * If that grid size is 0.0 then this ruler does not
85 * @param[in] gridSize (optional) The grid size for the ruler,
86 * (Default = 0.0 i.e. no snapping)
87 * @return The ruler is returned.
89 RulerPtr CreateRuler(float gridSize = 0.0f)
91 if(gridSize <= Math::MACHINE_EPSILON_0)
93 return new DefaultRuler();
95 return new FixedRuler(gridSize);
100 static bool gOnScrollStartCalled; ///< Whether the OnScrollStart signal was invoked.
101 static bool gOnScrollUpdateCalled; ///< Whether the OnScrollUpdate signal was invoked.
102 static bool gOnScrollCompleteCalled; ///< Whether the OnScrollComplete signal was invoked.
103 static bool gOnScrollClampedCalled; ///< Whether the OnScrollClamped signal was invoked.
104 static bool gOnSnapStartCalled; ///< Whether the OnSnapStart signal was invoked.
105 static ClampState3 gLastClampPosition; ///< Clamping information from OnScrollClampedEvent.
106 static SnapType gLastSnapType; ///< Snaping information from SnapEvent.
107 static Vector3 gConstraintResult; ///< Result from constraint.
109 static ActorContainer gPages; ///< Keeps track of all the pages for applying effects.
111 static void ResetScrollCallbackResults()
113 gOnScrollStartCalled = false;
114 gOnScrollUpdateCalled = false;
115 gOnScrollCompleteCalled = false;
119 * Invoked when scrolling starts.
121 * @param[in] position The current scroll position.
123 static void OnScrollStart( const Vector3& position )
125 gOnScrollStartCalled = true;
129 * Invoked when scrolling updates (via dragging)
131 * @param[in] position The current scroll position.
133 static void OnScrollUpdate( const Vector3& position )
135 gOnScrollUpdateCalled = true;
139 * Invoked when scrolling finishes
141 * @param[in] position The current scroll position.
143 static void OnScrollComplete( const Vector3& position )
145 gOnScrollCompleteCalled = true;
149 * Invoked when scrolling clamped.
151 * @param[in] event The position/scale/rotation axes that were clamped.
153 static void OnScrollClamped( const ScrollView::ClampEvent& event )
155 gOnScrollClampedCalled = true;
156 gLastClampPosition = event.position;
160 * Invoked when a snap or flick started.
162 * @param[in] event The type of snap and the target position/scale/rotation.
164 static void OnSnapStart( const ScrollView::SnapEvent& event )
166 gOnSnapStartCalled = true;
167 gLastSnapType = event.type;
170 ScrollView SetupTestScrollView(int rows, int columns, Vector2 size)
172 ScrollView scrollView = ScrollView::New();
173 scrollView.SetSize(size);
174 scrollView.SetAnchorPoint(AnchorPoint::CENTER);
175 scrollView.SetParentOrigin(ParentOrigin::CENTER);
176 scrollView.ApplyConstraint( Constraint::New<Dali::Vector3>( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::EqualToConstraint() ) );
177 // Disable Refresh signal (TET environment cannot use adaptor's Timer)
178 scrollView.SetWrapMode(false);
179 scrollView.SetRefreshInterval(0);
180 scrollView.ScrollStartedSignal().Connect( &OnScrollStart );
181 scrollView.ScrollUpdatedSignal().Connect( &OnScrollUpdate );
182 scrollView.ScrollCompletedSignal().Connect( &OnScrollComplete );
183 Stage::GetCurrent().Add( scrollView );
184 RulerPtr rulerX = CreateRuler(size.width);
185 RulerPtr rulerY = CreateRuler(size.height);
188 rulerX->SetDomain(RulerDomain(0.0f, size.width * columns));
196 rulerY->SetDomain(RulerDomain(0.0f, size.width * rows));
203 scrollView.SetRulerX( rulerX );
204 scrollView.SetRulerY( rulerY );
205 Stage::GetCurrent().Add( scrollView );
207 Actor container = Actor::New();
208 container.SetParentOrigin(ParentOrigin::CENTER);
209 container.SetAnchorPoint(AnchorPoint::CENTER);
210 container.SetSize( size );
211 scrollView.Add( container );
212 container.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
215 for(int row = 0;row<rows;row++)
217 for(int column = 0;column<columns;column++)
219 Actor page = Actor::New();
220 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
221 page.SetParentOrigin( ParentOrigin::CENTER );
222 page.SetAnchorPoint( AnchorPoint::CENTER );
223 page.SetPosition( column * size.x, row * size.y );
226 gPages.push_back(page);
230 ResetScrollCallbackResults();
237 ResetScrollCallbackResults();
240 Actor AddActorToPage(Actor page, float x, float y, float cols, float rows)
242 Stage stage = Stage::GetCurrent();
243 Vector2 stageSize = stage.GetSize();
245 const float margin = 10.0f;
246 const Vector2 actorSize((stageSize.x / cols) - margin, (stageSize.y / rows) - margin);
248 Actor actor = Actor::New();
249 actor.SetParentOrigin( ParentOrigin::CENTER );
250 actor.SetAnchorPoint( AnchorPoint::CENTER );
252 Vector3 position( margin * 0.5f + (actorSize.x + margin) * x - stageSize.width * 0.5f,
253 margin * 0.5f + (actorSize.y + margin) * y - stageSize.height * 0.5f,
255 Vector3 positionEnd( margin * 0.5f + (actorSize.x + margin) * (x + cols) - stageSize.width * 0.5f - margin,
256 margin * 0.5f + (actorSize.y + margin) * (y + rows) - stageSize.height * 0.5f - margin,
258 Vector3 size(positionEnd - position);
259 actor.SetPosition( position + size * 0.5f);
260 actor.SetSize( positionEnd - position );
265 } // unnamed namespace
268 int UtcDaliScrollViewCustomEffectSetup(void)
270 tet_infoline(" UtcDaliScrollViewCustomEffectSetup");
272 ScrollViewCustomEffect effect;
274 DALI_TEST_CHECK( !effect );
276 BaseHandle handle = ScrollViewCustomEffect::New();
278 DALI_TEST_CHECK( handle );
280 effect = ScrollViewCustomEffect::DownCast(handle);
282 DALI_TEST_CHECK( effect );
287 int UtcDaliScrollViewCubeEffectSetup(void)
289 tet_infoline(" UtcDaliScrollViewCubeEffectSetup");
291 ScrollViewCubeEffect effect;
293 DALI_TEST_CHECK( !effect );
295 BaseHandle handle = ScrollViewCubeEffect::New();
297 DALI_TEST_CHECK( handle );
299 effect = ScrollViewCubeEffect::DownCast(handle);
301 DALI_TEST_CHECK( effect );
305 int UtcDaliScrollViewSpiralEffectSetup(void)
307 tet_infoline(" UtcDaliScrollViewSpiralEffectSetup");
309 ScrollViewPageSpiralEffect effect;
311 DALI_TEST_CHECK( !effect );
313 BaseHandle handle = ScrollViewPageSpiralEffect::New();
315 DALI_TEST_CHECK( handle );
317 effect = ScrollViewPageSpiralEffect::DownCast(handle);
319 DALI_TEST_CHECK( effect );
326 int UtcDaliScrollViewSlideEffectSetup(void)
328 tet_infoline(" UtcDaliScrollViewSlideEffectSetup");
330 ScrollViewSlideEffect effect;
332 DALI_TEST_CHECK( !effect );
334 BaseHandle handle = ScrollViewSlideEffect::New();
336 DALI_TEST_CHECK( handle );
338 effect = ScrollViewSlideEffect::DownCast(handle);
340 DALI_TEST_CHECK( effect );
344 int UtcDaliScrollViewTwistEffectSetup(void)
346 tet_infoline(" UtcDaliScrollViewTwistEffectSetup");
348 ScrollViewTwistEffect effect;
350 DALI_TEST_CHECK( !effect );
352 BaseHandle handle = ScrollViewTwistEffect::New();
354 DALI_TEST_CHECK( handle );
356 effect = ScrollViewTwistEffect::DownCast(handle);
358 DALI_TEST_CHECK( effect );
362 int UtcDaliScrollViewCubeEffectTest(void)
364 ToolkitTestApplication application;
365 tet_infoline(" UtcDaliScrollViewCubeEffectTest");
367 Vector2 size = Stage::GetCurrent().GetSize();
369 ScrollView scrollView = SetupTestScrollView(1, 3, size);
370 Actor page = gPages[1];
371 Wait(application, 500);
373 ScrollViewCubeEffect effect = ScrollViewCubeEffect::New();
374 scrollView.ApplyEffect(effect);
376 Actor actor = AddActorToPage(page, 0.5f, 0.5f, 3, 3);
378 Vector3 actorPrePosition = actor.GetCurrentPosition();
380 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);
382 Actor actor2 = AddActorToPage(page, 0.5f, 0.5f, 3, 3);
383 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);
385 scrollView.ScrollTo(1);
386 while(!gOnScrollCompleteCalled)
390 // test that the first page has reached centre of screen
391 Vector3 actorPostPosition = actor.GetCurrentPosition();
392 // just check the actor has moved
393 DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
399 int UtcDaliScrollViewSpiralEffectTest(void)
401 ToolkitTestApplication application;
402 tet_infoline(" UtcDaliScrollViewSpiralEffectTest");
404 Vector2 size = Stage::GetCurrent().GetSize();
406 ScrollView scrollView = SetupTestScrollView(1, 3, size);
407 Actor testPage = gPages[1];
408 Wait(application, 500);
410 ScrollViewPageSpiralEffect effect = ScrollViewPageSpiralEffect::New();
411 scrollView.ApplyEffect(effect);
413 for(ActorIter pageIter = gPages.begin(); pageIter != gPages.end(); ++pageIter)
415 Actor page = *pageIter;
416 page.RemoveConstraints();
417 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
418 effect.ApplyToPage(page, Vector2(Math::PI_2, 0.0f));
422 scrollView.ScrollTo(1);
423 while(!gOnScrollCompleteCalled)
427 // test that the first page has reached centre of screen
428 Vector3 pagePos = testPage.GetCurrentPosition();
429 DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
436 int UtcDaliScrollViewSlideEffectTest(void)
438 ToolkitTestApplication application;
439 tet_infoline(" UtcDaliScrollViewSlideEffectTest");
441 Vector2 size = Stage::GetCurrent().GetSize();
442 Vector3 pageSize(size.x, size.y, 0.0f);
444 ScrollView scrollView = SetupTestScrollView(1, 3, size);
445 Actor testPage = gPages[1];
446 Wait(application, 500);
448 ScrollViewSlideEffect effect = ScrollViewSlideEffect::New();
449 effect.SetDelayReferenceOffset(pageSize * 0.25);
450 DALI_TEST_EQUALS(effect.GetDelayReferenceOffset(), pageSize * 0.25, Math::MACHINE_EPSILON_0, TEST_LOCATION);
451 effect.SetMaxDelayDuration(0.5f);
452 DALI_TEST_EQUALS(effect.GetMaxDelayDuration(), 0.5f, Math::MACHINE_EPSILON_0, TEST_LOCATION);
453 effect.SetSlideDirection(false);
454 DALI_TEST_CHECK(!effect.GetSlideDirection());
456 scrollView.ApplyEffect(effect);
458 Actor actor = AddActorToPage(testPage, 0.5f, 0.5f, 3, 3);
460 Vector3 actorPrePosition = actor.GetCurrentPosition();
462 effect.ApplyToActor(actor, 0.0f, 0.5f);
464 scrollView.ScrollTo(1);
465 while(!gOnScrollCompleteCalled)
469 // test that the first page has reached centre of screen
470 Vector3 actorPostPosition = actor.GetCurrentPosition();
471 // just check the actor has moved
472 DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
477 int UtcDaliScrollViewTwistEffectTest(void)
479 ToolkitTestApplication application;
480 tet_infoline(" UtcDaliScrollViewTwistEffectTest");
482 Vector2 size = Stage::GetCurrent().GetSize();
484 ScrollView scrollView = SetupTestScrollView(1, 3, size);
485 Actor testPage = gPages[1];
486 Wait(application, 500);
488 ScrollViewTwistEffect effect = ScrollViewTwistEffect::New();
489 float shrinkDist = 0.2f;
490 effect.SetMinimumDistanceForShrink(shrinkDist);
491 DALI_TEST_CHECK((shrinkDist - effect.GetMinimumDistanceForShrink()) < Math::MACHINE_EPSILON_0);
492 effect.EnableEffect(true);
493 scrollView.ApplyEffect(effect);
495 Actor actor = AddActorToPage(testPage, 0.5f, 0.5f, 3, 3);
497 Vector3 actorPrePosition = actor.GetCurrentPosition();
499 effect.ApplyToActor( actor,
501 Vector2(Math::PI_2, Math::PI_2),
504 scrollView.ScrollTo(1);
505 while(!gOnScrollCompleteCalled)
509 // test that the first page has reached centre of screen
510 Vector3 actorPostPosition = actor.GetCurrentPosition();
511 // just check the actor has moved
512 DALI_TEST_CHECK((actorPostPosition - actorPrePosition).Length() > Math::MACHINE_EPSILON_1);
517 int UtcDaliScrollViewCustomEffectTest(void)
519 ToolkitTestApplication application;
520 tet_infoline(" UtcDaliScrollViewCustomEffectTest");
522 Vector2 size = Stage::GetCurrent().GetSize();
523 Vector3 pageSize(size.x, size.y, 0.0f);
525 ScrollView scrollView = SetupTestScrollView(1, 3, size);
526 Actor testPage = gPages[1];
527 Wait(application, 500);
528 Vector3 pageStartPos, pagePos;
529 pageStartPos = pagePos = testPage.GetCurrentPosition();
530 //scrollView.RemoveConstraintsFromChildren();
532 ScrollViewCustomEffect effect = ScrollViewCustomEffect::DownCast(scrollView.ApplyEffect(ScrollView::PageEffectCarousel));
534 for(ActorIter pageIter = gPages.begin(); pageIter != gPages.end(); ++pageIter)
536 Actor page = *pageIter;
537 page.RemoveConstraints();
538 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
539 effect.ApplyToPage(page, pageSize);
542 pagePos = testPage.GetCurrentPosition();
543 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
545 scrollView.ScrollTo(1);
546 while(!gOnScrollCompleteCalled)
550 ResetScrollCallbackResults();
551 // test that the first page has reached centre of screen
552 pagePos = testPage.GetCurrentPosition();
553 DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
555 // scroll back to page 0
556 scrollView.ScrollTo(0);
557 while(!gOnScrollCompleteCalled)
561 ResetScrollCallbackResults();
562 pagePos = testPage.GetCurrentPosition();
563 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
565 scrollView.RemoveEffect(effect);
567 effect = ScrollViewCustomEffect::New();
568 effect.SetPageTranslation(Vector3(20.0f, 20.0f, 5.0f));
569 effect.SetPageTranslation(Vector3(20.0f, 20.0f, 5.0f), Vector3(20.0f, 20.0f, -5.0f));
570 effect.SetPageTranslationIn(Vector3(20.0f, 20.0f, 5.0f));
571 effect.SetPageTranslationOut(Vector3(20.0f, 20.0f, -5.0f));
572 effect.SetPageTranslation(Vector3(20.0f, 0.0f, 0.0f));
573 effect.SetSwingAngle(Math::PI, Vector3::YAXIS);
574 effect.SetPageSpacing(Vector2(20.0f, 20.0f));
575 scrollView.ApplyEffect(effect);
577 for(ActorIter pageIter = gPages.begin(); pageIter != gPages.end(); ++pageIter)
579 Actor page = *pageIter;
580 page.RemoveConstraints();
581 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
582 effect.ApplyToPage(page, pageSize);
585 pagePos = testPage.GetCurrentPosition();
586 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
588 scrollView.ScrollTo(1);
589 while(!gOnScrollCompleteCalled)
593 ResetScrollCallbackResults();
594 // test that the first page has reached centre of screen
595 pagePos = testPage.GetCurrentPosition();
596 DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
598 // scroll back to page 0
599 scrollView.ScrollTo(0);
600 while(!gOnScrollCompleteCalled)
604 ResetScrollCallbackResults();
605 pagePos = testPage.GetCurrentPosition();
606 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
608 scrollView.RemoveEffect(effect);
609 effect = ScrollViewCustomEffect::New();
610 effect.SetSwingAngle(Math::PI, Vector3::YAXIS);
611 effect.SetSwingAnchor(AnchorPoint::CENTER_LEFT);
612 effect.SetPageTranslation(Vector3(size.x, size.y, 0));
613 effect.SetOpacityThreshold(0.66f);
614 scrollView.ApplyEffect(effect);
616 for(ActorIter pageIter = gPages.begin(); pageIter != gPages.end(); ++pageIter)
618 Actor page = *pageIter;
619 page.RemoveConstraints();
620 page.ApplyConstraint( Constraint::New<Vector3>( Actor::SIZE, ParentSource( Actor::SIZE ), EqualToConstraint() ) );
621 effect.ApplyToPage(page, pageSize);
625 scrollView.ScrollTo(1);
626 while(!gOnScrollCompleteCalled)
630 ResetScrollCallbackResults();
631 // test that the first page has reached centre of screen
632 pagePos = testPage.GetCurrentPosition();
633 DALI_TEST_EQUALS(pagePos, Vector3::ZERO, Math::MACHINE_EPSILON_0, TEST_LOCATION);
635 // scroll back to page 0
636 scrollView.ScrollTo(0);
637 while(!gOnScrollCompleteCalled)
641 ResetScrollCallbackResults();
642 pagePos = testPage.GetCurrentPosition();
643 DALI_TEST_EQUALS(pagePos, pageStartPos, Math::MACHINE_EPSILON_0, TEST_LOCATION);
644 scrollView.RemoveEffect(effect);
647 effect.SetPageTranslateAlphaFunction(AlphaFunctions::Linear);
648 effect.SetPageTranslateAlphaFunction(AlphaFunctions::Linear, AlphaFunctions::Linear);
649 effect.SetPageTranslateAlphaFunctionIn(AlphaFunctions::Linear);
650 effect.SetPageTranslateAlphaFunctionOut(AlphaFunctions::Linear);
651 effect.SetGlobalPageRotation(Math::PI, Vector3::YAXIS);
652 effect.SetAngledOriginPageRotation(Vector3(Math::PI, Math::PI, 0.0f));
653 effect.SetGlobalPageRotation(Math::PI, Vector3::YAXIS, Math::PI, Vector3::YAXIS);
654 effect.SetGlobalPageRotationIn(Math::PI, Vector3::YAXIS);
655 effect.SetGlobalPageRotationOut(Math::PI, Vector3::YAXIS);
656 effect.SetGlobalPageRotationOrigin(Vector3::ZERO);
657 effect.SetGlobalPageRotationOrigin(Vector3::ZERO, Vector3::ZERO);
658 effect.SetGlobalPageRotationOriginIn(Vector3::ZERO);
659 effect.SetGlobalPageRotationOriginOut(Vector3::ZERO);
660 effect.SetSwingAngle(Math::PI, Vector3::YAXIS);
661 effect.SetSwingAngle(Math::PI, Vector3::YAXIS, Math::PI, Vector3::YAXIS);
662 effect.SetSwingAngleIn(Math::PI, Vector3::YAXIS);
663 effect.SetSwingAngleOut(Math::PI, Vector3::YAXIS);
664 effect.SetSwingAngleAlphaFunction(AlphaFunctions::Linear);
665 effect.SetSwingAngleAlphaFunction(AlphaFunctions::Linear, AlphaFunctions::Linear);
666 effect.SetSwingAngleAlphaFunctionIn(AlphaFunctions::Linear);
667 effect.SetSwingAngleAlphaFunctionOut(AlphaFunctions::Linear);
668 effect.SetSwingAnchor(AnchorPoint::CENTER, AnchorPoint::CENTER_LEFT);
669 effect.SetSwingAnchorIn(AnchorPoint::CENTER);
670 effect.SetSwingAnchorOut(AnchorPoint::CENTER);
671 effect.SetSwingAnchorAlphaFunction(AlphaFunctions::Linear);
672 effect.SetSwingAnchorAlphaFunction(AlphaFunctions::Linear, AlphaFunctions::Linear);
673 effect.SetSwingAnchorAlphaFunctionIn(AlphaFunctions::Linear);
674 effect.SetSwingAnchorAlphaFunctionOut(AlphaFunctions::Linear);
675 effect.SetOpacityThreshold(0.5f);
676 effect.SetOpacityThreshold(0.5f, 0.5f);
677 effect.SetOpacityThresholdIn(0.5f);
678 effect.SetOpacityThresholdOut(0.5f);
679 effect.SetOpacityAlphaFunction(AlphaFunctions::Linear);
680 effect.SetOpacityAlphaFunction(AlphaFunctions::Linear, AlphaFunctions::Linear);
681 effect.SetOpacityAlphaFunctionIn(AlphaFunctions::Linear);
682 effect.SetOpacityAlphaFunctionOut(AlphaFunctions::Linear);