+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
+
+ // We did expect the animation to finish
+ application.SendNotification();
+ finishCheck.CheckSignalReceived();
+ DALI_TEST_EQUALS( actor.GetCurrentColor().r, targetRed, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), targetRed, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION );
+ END_TEST;
+}
+
+int UtcDaliAnimationAnimateToActorColorGreenP(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+ Stage::GetCurrent().Add(actor);
+ float startValue(1.0f);
+ DALI_TEST_EQUALS( actor.GetCurrentColor().g, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION );
+
+ // Build the animation
+ float durationSeconds(1.0f);
+ Animation animation = Animation::New(durationSeconds);
+ float targetGreen(0.5f);
+ animation.AnimateTo( Property(actor, Actor::Property::COLOR_GREEN), targetGreen );
+
+ float fiftyPercentProgress(startValue + (targetGreen - startValue)*0.5f);
+
+ // Start the animation
+ animation.Play();
+
+ // Target value should be retrievable straight away
+ DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, targetGreen, startValue, startValue ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_GREEN ), targetGreen, TEST_LOCATION );
+
+ bool signalReceived(false);
+ AnimationFinishCheck finishCheck(signalReceived);
+ animation.FinishedSignal().Connect(&application, finishCheck);
+
+ application.SendNotification();
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f)/* 50% progress */);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+ DALI_TEST_EQUALS( actor.GetCurrentColor().g, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION );
+
+ application.SendNotification();
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
+
+ // We did expect the animation to finish
+ application.SendNotification();
+ finishCheck.CheckSignalReceived();
+ DALI_TEST_EQUALS( actor.GetCurrentColor().g, targetGreen, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), targetGreen, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION );
+ END_TEST;
+}
+
+int UtcDaliAnimationAnimateToActorColorBlueP(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+ Stage::GetCurrent().Add(actor);
+ float startValue(1.0f);
+ DALI_TEST_EQUALS( actor.GetCurrentColor().b, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION );
+
+ // Build the animation
+ float durationSeconds(1.0f);
+ Animation animation = Animation::New(durationSeconds);
+ float targetBlue(0.5f);
+ animation.AnimateTo( Property(actor, Actor::Property::COLOR_BLUE), targetBlue );
+
+ float fiftyPercentProgress(startValue + (targetBlue - startValue)*0.5f);
+
+ // Start the animation
+ animation.Play();
+
+ // Target value should be retrievable straight away
+ DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, startValue, targetBlue, startValue ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_BLUE ), targetBlue, TEST_LOCATION );
+
+ bool signalReceived(false);
+ AnimationFinishCheck finishCheck(signalReceived);
+ animation.FinishedSignal().Connect(&application, finishCheck);
+
+ application.SendNotification();
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f)/* 50% progress */);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+ DALI_TEST_EQUALS( actor.GetCurrentColor().b, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION );
+
+ application.SendNotification();
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
+
+ // We did expect the animation to finish
+ application.SendNotification();
+ finishCheck.CheckSignalReceived();
+ DALI_TEST_EQUALS( actor.GetCurrentColor().b, targetBlue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), targetBlue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION );
+ END_TEST;
+}
+
+int UtcDaliAnimationAnimateToActorColorAlphaP(void)
+{
+ TestApplication application;
+
+ Actor actor = Actor::New();
+ Stage::GetCurrent().Add(actor);
+ float startValue(1.0f);
+ DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION );
+
+ // Build the animation
+ float durationSeconds(1.0f);
+ Animation animation = Animation::New(durationSeconds);
+ float targetAlpha(0.5f);
+ animation.AnimateTo( Property(actor, Actor::Property::COLOR_ALPHA), targetAlpha );
+
+ float fiftyPercentProgress(startValue + (targetAlpha - startValue)*0.5f);
+
+ // Start the animation
+ animation.Play();
+
+ // Target value should be retrievable straight away
+ DALI_TEST_EQUALS( actor.GetProperty< Vector4 >( Actor::Property::COLOR ), Vector4( startValue, startValue, startValue, targetAlpha ), TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty< float >( Actor::Property::COLOR_ALPHA ), targetAlpha, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty< float >( DevelActor::Property::OPACITY ), targetAlpha, TEST_LOCATION );
+
+ bool signalReceived(false);
+ AnimationFinishCheck finishCheck(signalReceived);
+ animation.FinishedSignal().Connect(&application, finishCheck);
+
+ application.SendNotification();
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f)/* 50% progress */);
+
+ // We didn't expect the animation to finish yet
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+ DALI_TEST_EQUALS( actor.GetCurrentColor().a, fiftyPercentProgress, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), fiftyPercentProgress, TEST_LOCATION );
+
+ application.SendNotification();
+ application.Render(static_cast<unsigned int>(durationSeconds*500.0f) + 1u/*just beyond the animation duration*/);
+
+ // We did expect the animation to finish
+ application.SendNotification();
+ finishCheck.CheckSignalReceived();
+ DALI_TEST_EQUALS( actor.GetCurrentColor().a, targetAlpha, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), targetAlpha, TEST_LOCATION );
+ END_TEST;
+}
+
+int UtcDaliAnimationKeyFrames01P(void)
+{
+ TestApplication application;
+
+ KeyFrames keyFrames = KeyFrames::New();
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::NONE, TEST_LOCATION);
+
+ keyFrames.Add(0.0f, 0.1f);
+
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::FLOAT, TEST_LOCATION);
+
+ KeyFrames keyFrames2( keyFrames);
+ DALI_TEST_CHECK( keyFrames2 );
+ DALI_TEST_EQUALS(keyFrames2.GetType(), Property::FLOAT, TEST_LOCATION);
+
+ KeyFrames keyFrames3 = KeyFrames::New();
+ keyFrames3.Add(0.6f, true);
+ DALI_TEST_CHECK( keyFrames3 );
+ DALI_TEST_EQUALS(keyFrames3.GetType(), Property::BOOLEAN, TEST_LOCATION);
+
+ keyFrames3 = keyFrames;
+ DALI_TEST_CHECK( keyFrames3 );
+ DALI_TEST_EQUALS(keyFrames3.GetType(), Property::FLOAT, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliAnimationKeyFrames02P(void)
+{
+ TestApplication application;
+
+ KeyFrames keyFrames = KeyFrames::New();
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::NONE, TEST_LOCATION);
+
+ keyFrames.Add(0.0f, 0.1f);
+ keyFrames.Add(0.2f, 0.5f);
+ keyFrames.Add(0.4f, 0.0f);
+ keyFrames.Add(0.6f, 1.0f);
+ keyFrames.Add(0.8f, 0.7f);
+ keyFrames.Add(1.0f, 0.9f);
+
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::FLOAT, TEST_LOCATION);
+
+ try
+ {
+ keyFrames.Add(1.9f, false);
+ }
+ catch (Dali::DaliException& e)
+ {
+ DALI_TEST_PRINT_ASSERT( e );
+ DALI_TEST_ASSERT(e, "mType == value.GetType()", TEST_LOCATION);
+ }
+ END_TEST;
+}
+
+int UtcDaliAnimationKeyFrames03P(void)
+{
+ TestApplication application;
+
+ KeyFrames keyFrames = KeyFrames::New();
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::NONE, TEST_LOCATION);
+
+ keyFrames.Add(0.0f, true);
+ keyFrames.Add(0.2f, false);
+ keyFrames.Add(0.4f, false);
+ keyFrames.Add(0.6f, true);
+ keyFrames.Add(0.8f, true);
+ keyFrames.Add(1.0f, false);
+
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::BOOLEAN, TEST_LOCATION);
+
+ try
+ {
+ keyFrames.Add(0.7f, Vector3(1.0f, 1.0f, 1.0f));
+ }
+ catch (Dali::DaliException& e)
+ {
+ DALI_TEST_PRINT_ASSERT( e );
+ DALI_TEST_ASSERT(e, "mType == value.GetType()", TEST_LOCATION);
+ }
+ END_TEST;
+}
+
+int UtcDaliAnimationKeyFrames04P(void)
+{
+ TestApplication application;
+
+ KeyFrames keyFrames = KeyFrames::New();
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::NONE, TEST_LOCATION);
+
+ keyFrames.Add(0.0f, Vector2(0.0f, 0.0f));
+ keyFrames.Add(0.2f, Vector2(1.0f, 1.0f));
+ keyFrames.Add(0.4f, Vector2(2.0f, 2.0f));
+ keyFrames.Add(0.6f, Vector2(3.0f, 5.0f));
+ keyFrames.Add(0.8f, Vector2(4.0f, 3.0f));
+ keyFrames.Add(1.0f, Vector2(6.0f, 2.0f));
+
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::VECTOR2, TEST_LOCATION);
+
+ try
+ {
+ keyFrames.Add(0.7f, Vector3(1.0f, 1.0f, 1.0f));
+ }
+ catch (Dali::DaliException& e)
+ {
+ DALI_TEST_PRINT_ASSERT( e );
+ DALI_TEST_ASSERT(e, "mType == value.GetType()", TEST_LOCATION);
+ }
+ END_TEST;
+}
+
+int UtcDaliAnimationKeyFrames05P(void)
+{
+ TestApplication application;
+
+ KeyFrames keyFrames = KeyFrames::New();
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::NONE, TEST_LOCATION);
+
+ keyFrames.Add(0.0f, Vector3(0.0f, 4.0f, 0.0f));
+ keyFrames.Add(0.2f, Vector3(1.0f, 3.0f, 1.0f));
+ keyFrames.Add(0.4f, Vector3(2.0f, 2.0f, 2.0f));
+ keyFrames.Add(0.6f, Vector3(3.0f, 2.0f, 5.0f));
+ keyFrames.Add(0.8f, Vector3(4.0f, 4.0f, 3.0f));
+ keyFrames.Add(1.0f, Vector3(6.0f, 8.0f, 2.0f));
+
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::VECTOR3, TEST_LOCATION);
+
+ try
+ {
+ keyFrames.Add(0.7f, 1.0f);
+ }
+ catch (Dali::DaliException& e)
+ {
+ DALI_TEST_PRINT_ASSERT( e );
+ DALI_TEST_ASSERT(e, "mType == value.GetType()", TEST_LOCATION);
+ }
+ END_TEST;
+}
+
+int UtcDaliAnimationKeyFrames06P(void)
+{
+ TestApplication application;
+
+ KeyFrames keyFrames = KeyFrames::New();
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::NONE, TEST_LOCATION);
+
+ keyFrames.Add(0.0f, Vector4(0.0f, 0.0f, 0.0f, 0.0f));
+ keyFrames.Add(0.2f, Vector4(1.0f, 1.0f, 1.0f, 1.0f));
+ keyFrames.Add(0.4f, Vector4(2.0f, 2.0f, 2.0f, 2.0f));
+ keyFrames.Add(0.6f, Vector4(3.0f, 5.0f, 3.0f, 5.0f));
+ keyFrames.Add(0.8f, Vector4(4.0f, 3.0f, 4.0f, 3.0f));
+ keyFrames.Add(1.0f, Vector4(6.0f, 2.0f, 6.0f, 2.0f));
+
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::VECTOR4, TEST_LOCATION);
+
+ try
+ {
+ keyFrames.Add(0.7f, Quaternion(Radian(1.717f), Vector3::XAXIS));
+ }
+ catch (Dali::DaliException& e)
+ {
+ DALI_TEST_PRINT_ASSERT( e );
+ DALI_TEST_ASSERT(e, "mType == value.GetType()", TEST_LOCATION);
+ }
+ END_TEST;
+}
+
+int UtcDaliAnimationKeyFrames07P(void)
+{
+ TestApplication application;
+
+ KeyFrames keyFrames = KeyFrames::New();
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::NONE, TEST_LOCATION);
+
+ keyFrames.Add(0.0f, Quaternion(Radian(1.717f), Vector3::XAXIS));
+ keyFrames.Add(0.2f, Quaternion(Radian(2.0f), Vector3::XAXIS));
+ keyFrames.Add(0.4f, Quaternion(Radian(3.0f), Vector3::ZAXIS));
+ keyFrames.Add(0.6f, Quaternion(Radian(4.0f), Vector3(1.0f, 1.0f, 1.0f)));
+ keyFrames.Add(0.8f, AngleAxis(Degree(90), Vector3::XAXIS));
+ keyFrames.Add(1.0f, Quaternion(Radian(3.0f), Vector3::YAXIS));
+
+ DALI_TEST_EQUALS(keyFrames.GetType(), Property::ROTATION, TEST_LOCATION);
+
+ try
+ {
+ keyFrames.Add(0.7f, 1.1f);
+ }
+ catch (Dali::DaliException& e)
+ {
+ DALI_TEST_PRINT_ASSERT( e );
+ DALI_TEST_ASSERT(e, "mType == value.GetType()", TEST_LOCATION);
+ }
+ END_TEST;
+}
+
+int UtcDaliAnimationAnimateBetweenActorColorAlphaP(void)
+{
+ TestApplication application;
+
+ float startValue(1.0f);
+ Actor actor = Actor::New();
+ actor.SetColor(Vector4(startValue, startValue, startValue, startValue));
+ Stage::GetCurrent().Add(actor);
+
+ DALI_TEST_EQUALS( actor.GetCurrentColor().a, startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetProperty<float>(Actor::Property::COLOR_ALPHA), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE ), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA ), startValue, TEST_LOCATION );
+
+ // Build the animation
+ float durationSeconds(1.0f);
+ Animation animation = Animation::New(durationSeconds);
+
+ KeyFrames keyFrames = KeyFrames::New();
+ keyFrames.Add(0.0f, 0.1f);
+ keyFrames.Add(0.2f, 0.5f);
+ keyFrames.Add(0.4f, 0.0f);
+ keyFrames.Add(0.6f, 1.0f);
+ keyFrames.Add(0.8f, 0.7f);
+ keyFrames.Add(1.0f, 0.9f);
+
+ animation.AnimateBetween( Property(actor, Actor::Property::COLOR_ALPHA), keyFrames );
+
+ // Start the animation
+ animation.Play();
+
+ bool signalReceived(false);
+ AnimationFinishCheck finishCheck(signalReceived);
+ animation.FinishedSignal().Connect(&application, finishCheck);
+ application.SendNotification();
+ application.Render(0);
+ application.SendNotification();
+ finishCheck.CheckSignalNotReceived();
+ DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.1f, TEST_LOCATION );
+
+ application.Render(static_cast<unsigned int>(durationSeconds*100.0f)/* 10% progress */);
+ application.SendNotification();
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), 0.3f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.3f, 0.01f, TEST_LOCATION );
+
+ application.Render(static_cast<unsigned int>(durationSeconds*200.0f)/* 30% progress */);
+ application.SendNotification();
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_RED), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_GREEN), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_BLUE), startValue, TEST_LOCATION );
+ DALI_TEST_EQUALS( DevelHandle::GetCurrentProperty< float >( actor, Actor::Property::COLOR_ALPHA), 0.25f, 0.01f, TEST_LOCATION );
+ DALI_TEST_EQUALS( actor.GetCurrentColor().a, 0.25f, 0.01f, TEST_LOCATION );