Alpha function changes 15/38415/6
authorFerran Sole <ferran.sole@samsung.com>
Mon, 20 Apr 2015 13:48:12 +0000 (14:48 +0100)
committerFerran Sole <ferran.sole@samsung.com>
Mon, 27 Apr 2015 08:12:16 +0000 (09:12 +0100)
Change-Id: Iaaea70d0620aa122139ab40f8a00f94493677ac3

21 files changed:
demo/dali-table-view.cpp
examples/animated-shapes/animated-shapes-example.cpp
examples/blocks/blocks-example.cpp
examples/buttons/buttons-example.cpp
examples/cluster/cluster-impl.cpp
examples/cluster/cluster-style.cpp
examples/cluster/cluster-style.h
examples/cluster/cluster.h
examples/dissolve-effect/dissolve-effect-example.cpp
examples/image-scaling-irregular-grid/image-scaling-irregular-grid-example.cpp
examples/item-view/item-view-example.cpp
examples/logging/logging-example.cpp
examples/magnifier/magnifier-example.cpp
examples/motion-blur/motion-blur-example.cpp
examples/motion-stretch/motion-stretch-example.cpp
examples/radial-menu/radial-menu-example.cpp
examples/radial-menu/radial-sweep-view-impl.cpp
examples/scroll-view/scroll-view-example.cpp
examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp
examples/text-label-emojis/text-label-emojis.cpp
examples/text-label-multi-language/text-label-multi-language-example.cpp

index c1b7f6b..cb56cd5 100644 (file)
@@ -479,8 +479,8 @@ void DaliTableView::Rotate( unsigned int degrees )
   }
 
   mRotateAnimation = Animation::New( ROTATE_ANIMATION_TIME );
-  mRotateAnimation.AnimateTo( Property( mRootActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( 360 - degrees ) ), Vector3::ZAXIS ), AlphaFunctions::EaseOut );
-  mRotateAnimation.AnimateTo( Property( mRootActor, Actor::Property::SIZE ), targetSize, AlphaFunctions::EaseOut );
+  mRotateAnimation.AnimateTo( Property( mRootActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( 360 - degrees ) ), Vector3::ZAXIS ), AlphaFunction::EASE_OUT );
+  mRotateAnimation.AnimateTo( Property( mRootActor, Actor::Property::SIZE ), targetSize, AlphaFunction::EASE_OUT );
   mRotateAnimation.Play();
 }
 
@@ -592,9 +592,9 @@ bool DaliTableView::OnTilePressed( Actor actor, const TouchEvent& event )
 
       // scale the content actor within the Tile, as to not affect the placement within the Table.
       Actor content = actor.GetChildAt(0);
-      mPressedAnimation.AnimateTo( Property( content, Actor::Property::SCALE ), Vector3( 0.9f, 0.9f, 1.0f ), AlphaFunctions::EaseInOut,
+      mPressedAnimation.AnimateTo( Property( content, Actor::Property::SCALE ), Vector3( 0.9f, 0.9f, 1.0f ), AlphaFunction::EASE_IN_OUT,
                                  TimePeriod( 0.0f, BUTTON_PRESS_ANIMATION_TIME * 0.5f ) );
-      mPressedAnimation.AnimateTo( Property( content, Actor::Property::SCALE ), Vector3::ONE, AlphaFunctions::EaseInOut,
+      mPressedAnimation.AnimateTo( Property( content, Actor::Property::SCALE ), Vector3::ONE, AlphaFunction::EASE_IN_OUT,
                                  TimePeriod( BUTTON_PRESS_ANIMATION_TIME * 0.5f, BUTTON_PRESS_ANIMATION_TIME * 0.5f ) );
       mPressedAnimation.Play();
       mPressedAnimation.FinishedSignal().Connect( this, &DaliTableView::OnPressedAnimationFinished );
@@ -759,7 +759,7 @@ void DaliTableView::InitialiseBackgroundActors( Actor actor )
 
     // Kickoff animation
     Animation animation = Animation::New( Random::Range( 40.0f, 80.0f ) );
-    animation.AnimateBy( Property( child, Actor::Property::POSITION ), Vector3( 0.0f, -1.0f, 0.0f ), AlphaFunctions::Linear );
+    animation.AnimateBy( Property( child, Actor::Property::POSITION ), Vector3( 0.0f, -1.0f, 0.0f ), AlphaFunction::LINEAR );
     animation.SetLooping( true );
     animation.Play();
     mBackgroundAnimations.push_back( animation );
index e36d9e5..0c59827 100644 (file)
@@ -143,25 +143,25 @@ public:
     k0.Add( 0.0f, Vector3( 0.0f,-radius, 0.0f) );
     k0.Add( 0.5f, Vector3(0.0f, -radius*4.0f, 0.0f));
     k0.Add( 1.0f, Vector3( 0.0f,-radius, 0.0f) );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(1)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(1)),k0,AlphaFunction::EASE_IN_OUT );
 
     k0 = KeyFrames::New();
     k0.Add( 0.0f, Vector3( radius, 0.0f, 0.0f) );
     k0.Add( 0.5f, Vector3(radius*4.0f,0.0f, 0.0f));
     k0.Add( 1.0f, Vector3( radius,0.0f, 0.0f));
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(4)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(4)),k0,AlphaFunction::EASE_IN_OUT );
 
     k0 = KeyFrames::New();
     k0.Add( 0.0f, Vector3(0.0f,radius, 0.0f) );
     k0.Add( 0.5f, Vector3(0.0f,radius*4.0f, 0.0f));
     k0.Add( 1.0f, Vector3(0.0f,radius, 0.0f) );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(7)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(7)),k0,AlphaFunction::EASE_IN_OUT );
 
     k0 = KeyFrames::New();
     k0.Add( 0.0f, Vector3( -radius,  0.0f, 0.0f) );
     k0.Add( 0.5f, Vector3(-radius*4.0f,0.0f, 0.0f));
     k0.Add( 1.0f, Vector3( -radius,  0.0f, 0.0f) );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(10)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(10)),k0,AlphaFunction::EASE_IN_OUT );
 
     animation.AnimateBy( Property( meshActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(90.0f) ), Vector3::ZAXIS ) );
     animation.SetLooping( true );
@@ -244,19 +244,19 @@ public:
     k0.Add( 0.0f,v3  );
     k0.Add( 0.5f, v3 + Vector3(-200.0f,-200.0f,0.0f));
     k0.Add( 1.0f, v3 );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(1)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(1)),k0,AlphaFunction::EASE_IN_OUT );
 
     k0 = KeyFrames::New();
     k0.Add( 0.0f,v4  );
     k0.Add( 0.5f, v4 + Vector3(200.0f,-200.0f,0.0f));
     k0.Add( 1.0f, v4 );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(4)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(4)),k0,AlphaFunction::EASE_IN_OUT );
 
     k0 = KeyFrames::New();
     k0.Add( 0.0f,v5  );
     k0.Add( 0.5f, v5 + Vector3(0.0,200.0f,0.0f));
     k0.Add( 1.0f, v5 );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(7)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(7)),k0,AlphaFunction::EASE_IN_OUT );
     animation.SetLooping( true );
     animation.Play();
   }
@@ -324,25 +324,25 @@ public:
     k0.Add( 0.0f, Vector3( 0.0f,-radius*2.0, 0.0f) );
     k0.Add( 0.5f, Vector3(-radius*2.0, -radius*3.0f, 0.0f));
     k0.Add( 1.0f, Vector3( 0.0f,-radius*2.0, 0.0f) );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(1)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(1)),k0,AlphaFunction::EASE_IN_OUT );
 
     k0 = KeyFrames::New();
     k0.Add( 0.0f, Vector3( radius*2.0, 0.0f, 0.0f) );
     k0.Add( 0.5f, Vector3(radius*3.0f,-radius*2.0, 0.0f));
     k0.Add( 1.0f, Vector3( radius*2.0,0.0f, 0.0f));
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(4)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(4)),k0,AlphaFunction::EASE_IN_OUT );
 
     k0 = KeyFrames::New();
     k0.Add( 0.0f, Vector3(0.0f,radius*2.0, 0.0f) );
     k0.Add( 0.5f, Vector3(radius*2.0,radius*3.0f, 0.0f));
     k0.Add( 1.0f, Vector3(0.0f,radius*2.0, 0.0f) );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(7)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(7)),k0,AlphaFunction::EASE_IN_OUT );
 
     k0 = KeyFrames::New();
     k0.Add( 0.0f, Vector3( -radius*2.0,  0.0f, 0.0f) );
     k0.Add( 0.5f, Vector3(-radius*3.0f,radius*2.0, 0.0f));
     k0.Add( 1.0f, Vector3( -radius*2.0,  0.0f, 0.0f) );
-    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(10)),k0,AlphaFunctions::EaseInOutSine );
+    animation.AnimateBetween( Property(shader, shader.GetPointPropertyName(10)),k0,AlphaFunction::EASE_IN_OUT );
 
     animation.AnimateBy( Property( meshActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(-90.0f) ), Vector3::ZAXIS ) );
     animation.SetLooping( true );
index 35315df..23775b2 100644 (file)
@@ -595,8 +595,8 @@ private:
 
         mDragActor = actor;
         mDragAnimation = Animation::New(0.25f);
-        mDragAnimation.AnimateTo( Property(mDragActor, Actor::Property::SCALE), Vector3(1.1f, 1.1f, 1.0f), AlphaFunctions::EaseOut);
-        mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::Property::COLOR), Vector4(1.0f, 1.0f, 1.0f, 0.0f), AlphaFunctions::EaseOut);
+        mDragAnimation.AnimateTo( Property(mDragActor, Actor::Property::SCALE), Vector3(1.1f, 1.1f, 1.0f), AlphaFunction::EASE_OUT);
+        mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::Property::COLOR), Vector4(1.0f, 1.0f, 1.0f, 0.0f), AlphaFunction::EASE_OUT);
         mDragAnimation.Play();
       }
     }
@@ -621,8 +621,8 @@ private:
         if(point.state==TouchPoint::Up) // Stop dragging
         {
           mDragAnimation = Animation::New(0.25f);
-          mDragAnimation.AnimateTo( Property(mDragActor, Actor::Property::SCALE), Vector3(1.0f, 1.0f, 1.0f), AlphaFunctions::EaseIn);
-          mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::Property::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f), AlphaFunctions::EaseOut);
+          mDragAnimation.AnimateTo( Property(mDragActor, Actor::Property::SCALE), Vector3(1.0f, 1.0f, 1.0f), AlphaFunction::EASE_IN);
+          mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::Property::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f), AlphaFunction::EASE_OUT);
           mDragAnimation.Play();
           mDragActor.Reset();
         }
@@ -764,7 +764,7 @@ private:
 
     // fade brick (destroy)
     Animation destroyAnimation = Animation::New(0.5f);
-    destroyAnimation.AnimateTo( Property( brick, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn );
+    destroyAnimation.AnimateTo( Property( brick, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN );
     destroyAnimation.Play();
     destroyAnimation.FinishedSignal().Connect( this, &ExampleController::OnBrickDestroyed );
     mDestroyAnimationMap[destroyAnimation] = brick;
index 7395653..739d357 100644 (file)
@@ -484,7 +484,7 @@ class ButtonsController: public ConnectionTracker
       {
         if( mAnimation )
         {
-          mAnimation.AnimateBy( Property(actor, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunctions::Linear );
+          mAnimation.AnimateBy( Property(actor, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunction::LINEAR );
           mAnimation.Play();
           mLastPoint = localPoint;
         }
index 2768d03..00b91f9 100644 (file)
@@ -104,8 +104,8 @@ void Cluster::OnControlSizeSet( const Vector3& targetSize )
     {
       mClusterStyle.ApplyStyle( (*iter).mActor,
                                 (*iter).mPositionIndex,
-                                AlphaFunctions::EaseOut,
-                                0.f );
+                                AlphaFunction::EASE_OUT,
+                                TimePeriod(0.f) );
     }
   }
 
@@ -175,7 +175,7 @@ void Cluster::AddChildInfoAt( ChildInfo childInfo, unsigned int index )
     child.RemoveConstraints();
 
     // apply new constraints to the child
-    mClusterStyle.ApplyStyle(child, childInfo.mPositionIndex, AlphaFunctions::EaseOut, 0.0f);
+    mClusterStyle.ApplyStyle(child, childInfo.mPositionIndex, AlphaFunction::EASE_OUT, TimePeriod(0.0f));
   }
   else
   {
@@ -293,8 +293,8 @@ void Cluster::ExpandChild( unsigned int index )
                      position,
                      Vector3::ONE * scale,
                      Quaternion(rotate, Vector3::ZAXIS),
-                     AlphaFunctions::EaseOut,
-                     0.5f);
+                     AlphaFunction::EASE_OUT,
+                     TimePeriod(0.5f));
     }
   }
 }
@@ -312,8 +312,8 @@ void Cluster::CollapseChild( unsigned int index, bool front )
   if( index < mChildren.size() )
   {
     RestoreChild(index,
-                 AlphaFunctions::EaseOut,
-                 0.25f,
+                 AlphaFunction::EASE_OUT,
+                 TimePeriod(0.25f),
                  front);
   }
 }
@@ -323,8 +323,8 @@ void Cluster::CollapseAllChildren( bool front )
   for(unsigned int index = 0;index < mChildren.size(); index++)
   {
     RestoreChild(index,
-                 AlphaFunctions::EaseOut,
-                 0.25f,
+                 AlphaFunction::EASE_OUT,
+                 TimePeriod(0.25f),
                  front);
   }
 }
@@ -344,9 +344,9 @@ void Cluster::TransformChild( unsigned int index, const Vector3& position, const
 
       child.RemoveConstraints();
       Animation animation = Animation::New(period.delaySeconds + period.durationSeconds);
-      animation.AnimateTo( Property(child, Actor::Property::POSITION), position, AlphaFunctions::EaseOut, period);
-      animation.AnimateTo( Property(child, Actor::Property::SCALE), scale, AlphaFunctions::EaseOut, period);
-      animation.AnimateTo( Property(child, Actor::Property::ORIENTATION), rotation, AlphaFunctions::EaseOut, period);
+      animation.AnimateTo( Property(child, Actor::Property::POSITION), position, AlphaFunction::EASE_OUT, period);
+      animation.AnimateTo( Property(child, Actor::Property::SCALE), scale, AlphaFunction::EASE_OUT, period);
+      animation.AnimateTo( Property(child, Actor::Property::ORIENTATION), rotation, AlphaFunction::EASE_OUT, period);
       animation.Play();
     }
   }
@@ -435,8 +435,8 @@ void Cluster::SetStyle(Demo::ClusterStyle style)
     {
       mClusterStyle.ApplyStyle( (*iter).mActor,
                         (*iter).mPositionIndex,
-                        AlphaFunctions::EaseOut,
-                        CLUSTER_STYLE_CONSTRAINT_DURATION );
+                        AlphaFunction::EASE_OUT,
+                        TimePeriod(CLUSTER_STYLE_CONSTRAINT_DURATION) );
     }
   }
 
@@ -463,7 +463,7 @@ void Cluster::UpdateBackground(float duration)
 {
   if (mBackgroundImage)
   {
-    mClusterStyle.ApplyStyleToBackground(mBackgroundImage, AlphaFunctions::EaseOut, duration);
+    mClusterStyle.ApplyStyleToBackground(mBackgroundImage, AlphaFunction::EASE_OUT, TimePeriod(duration));
   }
 }
 
@@ -471,7 +471,7 @@ void Cluster::UpdateTitle(float duration)
 {
   if (mTitle)
   {
-    mClusterStyle.ApplyStyleToTitle(mTitle, AlphaFunctions::EaseOut, duration);
+    mClusterStyle.ApplyStyleToTitle(mTitle, AlphaFunction::EASE_OUT, TimePeriod(duration));
   }
 }
 
@@ -539,7 +539,7 @@ void Cluster::DoTransformAction(const PropertyValueContainer& attributes)
   // wrap index around -1 => size - 1
   index%= mChildren.size();
 
-  TransformChild(index, position, scale, rotation, AlphaFunctions::EaseOut, 0.5f);
+  TransformChild(index, position, scale, rotation, AlphaFunction::EASE_OUT, TimePeriod(0.5f));
 }
 
 void Cluster::OnControlChildRemove(Actor& child)
index 91c4c1c..6117d86 100644 (file)
@@ -57,17 +57,17 @@ unsigned int ClusterStyle::GetMaximumNumberOfChildren() const
 
 void ClusterStyle::ApplyStyle(Actor child, unsigned int index, AlphaFunction alpha, const TimePeriod& durationSeconds)
 {
-  GetImpl(*this).ApplyStyle(child, index, alpha, durationSeconds);
+  GetImpl(*this).ApplyStyle(child, index, alpha, TimePeriod(durationSeconds));
 }
 
 void ClusterStyle::ApplyStyleToBackground(Actor background, AlphaFunction alpha, const TimePeriod& durationSeconds)
 {
-  GetImpl(*this).ApplyStyleToBackground(background, alpha, durationSeconds);
+  GetImpl(*this).ApplyStyleToBackground(background, alpha, TimePeriod(durationSeconds));
 }
 
 void ClusterStyle::ApplyStyleToTitle(Actor title, AlphaFunction alpha, const TimePeriod& durationSeconds)
 {
-  GetImpl(*this).ApplyStyleToTitle(title, alpha, durationSeconds);
+  GetImpl(*this).ApplyStyleToTitle(title, alpha, TimePeriod(durationSeconds));
 }
 
 // ClusterStyleStandard ///////////////////////////////////////////////////////
index ce2fabc..1e39ff7 100644 (file)
@@ -20,7 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/actors/actor.h>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 #include <dali/public-api/common/dali-common.h>
 #include <dali/public-api/object/base-handle.h>
index 98015bd..07a08dc 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
 #include <dali/public-api/animation/time-period.h>
 
 // INTERNAL INCLUDES
index 9be4308..ebbe4c9 100644 (file)
@@ -297,21 +297,21 @@ void DissolveEffectApp::StartTransition(Vector2 position, Vector2 displacement)
   mCurrentImageEffect.SetCentralLine(position,displacement);
   mCurrentImageEffect.SetDistortion(0.0f);
   mCurrentImage.SetShaderEffect(mCurrentImageEffect);
-  mAnimation.AnimateTo( Property(mCurrentImageEffect, mCurrentImageEffect.GetDistortionPropertyName()), 1.0f, AlphaFunctions::Linear );
+  mAnimation.AnimateTo( Property(mCurrentImageEffect, mCurrentImageEffect.GetDistortionPropertyName()), 1.0f, AlphaFunction::LINEAR );
 
   mNextImage.SetOpacity(0.0f);
-  mAnimation.AnimateTo( Property( mNextImage, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::Linear );
+  mAnimation.AnimateTo( Property( mNextImage, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::LINEAR );
 
   if(mUseHighPrecision)
   {
     mNextImageEffect.SetCentralLine(position,-displacement);
     mNextImageEffect.SetDistortion(1.0f);
     mNextImage.SetShaderEffect(mNextImageEffect);
-    mAnimation.AnimateTo( Property(mNextImageEffect, mNextImageEffect.GetDistortionPropertyName()), 0.0f, AlphaFunctions::Linear );
+    mAnimation.AnimateTo( Property(mNextImageEffect, mNextImageEffect.GetDistortionPropertyName()), 0.0f, AlphaFunction::LINEAR );
   }
   else
   {
-    mAnimation.AnimateTo( Property( mNextImage, Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), AlphaFunctions::Linear );
+    mAnimation.AnimateTo( Property( mNextImage, Actor::Property::POSITION ), Vector3( 0.0f, 0.0f, 0.0f ), AlphaFunction::LINEAR );
   }
 
   mAnimation.FinishedSignal().Connect( this, &DissolveEffectApp::OnTransitionCompleted );
index ced7828..d921645 100644 (file)
@@ -465,7 +465,7 @@ public:
       {
         // Spin the image a few times:
         Animation animation = Animation::New(SPIN_DURATION);
-        animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunctions::EaseOut );
+        animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunction::EASE_OUT );
         animation.Play();
 
         // Change the scaling mode:
index 2fc3609..6a0a6e2 100644 (file)
@@ -103,9 +103,9 @@ const unsigned int IMAGE_WIDTH = 256;
 const unsigned int IMAGE_HEIGHT = 256;
 const unsigned int NUM_IMAGE_PER_ROW_IN_ATLAS = 8;
 
-AlphaFunction ALPHA_FUNCTIONS[] = { AlphaFunctions::Linear,
-                                    AlphaFunctions::EaseIn,
-                                    AlphaFunctions::EaseOut };
+AlphaFunction ALPHA_FUNCTIONS[] = { AlphaFunction(AlphaFunction::LINEAR),
+                                    AlphaFunction(AlphaFunction::EASE_IN),
+                                    AlphaFunction(AlphaFunction::EASE_OUT) };
 
 const unsigned int NUM_ALPHA_FUNCTIONS = sizeof(ALPHA_FUNCTIONS) / sizeof(AlphaFunction);
 
index f61a5c1..a37fcb4 100644 (file)
@@ -700,7 +700,7 @@ class LoggingController: public ConnectionTracker
       {
         if( mAnimation )
         {
-          mAnimation.AnimateBy( Property(actor, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunctions::Linear );
+          mAnimation.AnimateBy( Property(actor, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunction::LINEAR );
           mAnimation.Play();
           mLastPoint = localPoint;
         }
index 2954cb9..08c107e 100644 (file)
@@ -344,7 +344,7 @@ public:
     if(!mMagnifierShown)
     {
       Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION);
-      animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ONE, AlphaFunctions::EaseIn);
+      animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ONE, AlphaFunction::EASE_IN);
       animation.Play();
       mMagnifierShown = true;
     }
@@ -358,7 +358,7 @@ public:
     if(mMagnifierShown)
     {
       Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION);
-      animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ZERO, AlphaFunctions::EaseOut);
+      animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ZERO, AlphaFunction::EASE_OUT);
       animation.Play();
       mMagnifierShown = false;
     }
index b733c6d..ccc056c 100644 (file)
@@ -322,7 +322,7 @@ public:
       {
         // has parent so we expect it to be on stage, start animation
         mRotateAnimation = Animation::New( ORIENTATION_DURATION );
-        mRotateAnimation.AnimateTo( Property( mView, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -orientation ) ), Vector3::ZAXIS ), AlphaFunctions::EaseOut );
+        mRotateAnimation.AnimateTo( Property( mView, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -orientation ) ), Vector3::ZAXIS ), AlphaFunction::EASE_OUT );
         mRotateAnimation.AnimateTo( Property( mView, Actor::Property::SIZE_WIDTH ), targetSize.width );
         mRotateAnimation.AnimateTo( Property( mView, Actor::Property::SIZE_HEIGHT ), targetSize.height );
         mRotateAnimation.Play();
@@ -367,7 +367,7 @@ public:
     mActorTapMovementAnimation = Animation::New( animDuration );
     if ( mMotionBlurImageActor )
     {
-      mActorTapMovementAnimation.AnimateTo( Property(mMotionBlurImageActor, Actor::Property::POSITION), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) );
+      mActorTapMovementAnimation.AnimateTo( Property(mMotionBlurImageActor, Actor::Property::POSITION), destPos, AlphaFunction::EASE_IN_OUT_SINE, TimePeriod(animDuration) );
     }
     mActorTapMovementAnimation.SetEndAction( Animation::Bake );
     mActorTapMovementAnimation.Play();
@@ -383,7 +383,7 @@ public:
         {
           float animDuration = 1.0f;
           mActorAnimation = Animation::New(animDuration);
-          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunctions::EaseInOut );
+          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunction::EASE_IN_OUT );
           mActorAnimation.SetEndAction( Animation::Bake );
           mActorAnimation.Play();
         }
@@ -394,7 +394,7 @@ public:
         {
           float animDuration = 1.0f;
           mActorAnimation = Animation::New(animDuration);
-          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunctions::EaseInOut );
+          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunction::EASE_IN_OUT );
           mActorAnimation.SetEndAction( Animation::Bake );
           mActorAnimation.Play();
         }
@@ -405,8 +405,8 @@ public:
         {
           float animDuration = 1.0f;
           mActorAnimation = Animation::New(animDuration);
-          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunctions::EaseInOut );
-          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunctions::EaseInOut );
+          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunction::EASE_IN_OUT );
+          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunction::EASE_IN_OUT );
           mActorAnimation.SetEndAction( Animation::Bake );
           mActorAnimation.Play();
         }
@@ -417,7 +417,7 @@ public:
         {
           float animDuration = 1.0f;
           mActorAnimation = Animation::New(animDuration);
-          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), AlphaFunctions::Bounce, TimePeriod( 0.0f, 1.0f ) );
+          mActorAnimation.AnimateBy( Property( mMotionBlurImageActor, Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), AlphaFunction::BOUNCE, TimePeriod( 0.0f, 1.0f ) );
           mActorAnimation.SetEndAction( Animation::Bake );
           mActorAnimation.Play();
         }
index 570005e..b9c4a75 100644 (file)
@@ -220,7 +220,7 @@ public:
       {
         // has parent so we expect it to be on stage, start animation
         mRotateAnimation = Animation::New( ORIENTATION_DURATION );
-        mRotateAnimation.AnimateTo( Property( mView, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -orientation ) ), Vector3::ZAXIS ), AlphaFunctions::EaseOut );
+        mRotateAnimation.AnimateTo( Property( mView, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -orientation ) ), Vector3::ZAXIS ), AlphaFunction::EASE_OUT );
         mRotateAnimation.AnimateTo( Property( mView, Actor::Property::SIZE_WIDTH ), targetSize.width );
         mRotateAnimation.AnimateTo( Property( mView, Actor::Property::SIZE_HEIGHT ), targetSize.height );
         mRotateAnimation.Play();
@@ -264,7 +264,7 @@ public:
     mActorTapMovementAnimation = Animation::New( animDuration );
     if ( mMotionStretchImageActor )
     {
-      mActorTapMovementAnimation.AnimateTo( Property(mMotionStretchImageActor, Actor::Property::POSITION), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) );
+      mActorTapMovementAnimation.AnimateTo( Property(mMotionStretchImageActor, Actor::Property::POSITION), destPos, AlphaFunction::EASE_IN_OUT_SINE, TimePeriod(animDuration) );
     }
     mActorTapMovementAnimation.SetEndAction( Animation::Bake );
     mActorTapMovementAnimation.Play();
@@ -280,7 +280,7 @@ public:
         {
           float animDuration = 1.0f;
           mActorAnimation = Animation::New(animDuration);
-          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunctions::EaseInOut );
+          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunction::EASE_IN_OUT );
           mActorAnimation.SetEndAction( Animation::Bake );
           mActorAnimation.Play();
         }
@@ -291,7 +291,7 @@ public:
         {
           float animDuration = 1.0f;
           mActorAnimation = Animation::New(animDuration);
-          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunctions::EaseInOut );
+          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunction::EASE_IN_OUT );
           mActorAnimation.SetEndAction( Animation::Bake );
           mActorAnimation.Play();
         }
@@ -302,8 +302,8 @@ public:
         {
           float animDuration = 1.0f;
           mActorAnimation = Animation::New(animDuration);
-          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunctions::EaseInOut );
-          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunctions::EaseInOut );
+          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::YAXIS ), AlphaFunction::EASE_IN_OUT );
+          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f) ), Vector3::ZAXIS ), AlphaFunction::EASE_IN_OUT );
           mActorAnimation.SetEndAction( Animation::Bake );
           mActorAnimation.Play();
         }
@@ -314,7 +314,7 @@ public:
         {
           float animDuration = 1.0f;
           mActorAnimation = Animation::New(animDuration);
-          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), AlphaFunctions::Bounce, TimePeriod( 0.0f, 1.0f ) );
+          mActorAnimation.AnimateBy( Property( mMotionStretchImageActor, Actor::Property::SCALE ), Vector3(2.0f, 2.0f, 2.0f), AlphaFunction::BOUNCE, TimePeriod( 0.0f, 1.0f ) );
           mActorAnimation.SetEndAction( Animation::Bake );
           mActorAnimation.Play();
         }
index 01b9bad..c98a6ef 100644 (file)
@@ -194,8 +194,8 @@ void RadialMenuExample::StartAnimation()
   mRadialSweepView1.Activate(mAnimation, 0.0f, 3.0f);
   mRadialSweepView2.Activate(mAnimation, 1.5f, 3.0f);
   mRadialSweepView3.Activate(mAnimation, 3.0f, 3.0f);
-  mAnimation.AnimateTo( Property( mDialActor, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn, TimePeriod( 0.0f, 0.8f ) );
-  mAnimation.AnimateTo( Property( mRadialSweepView1, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn, TimePeriod( 0.0f, 0.5f ) );
+  mAnimation.AnimateTo( Property( mDialActor, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::EASE_IN, TimePeriod( 0.0f, 0.8f ) );
+  mAnimation.AnimateTo( Property( mRadialSweepView1, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::EASE_IN, TimePeriod( 0.0f, 0.5f ) );
   mAnimation.FinishedSignal().Connect( this, &RadialMenuExample::OnAnimationFinished );
 
   mAnimationState = PLAYING;
@@ -259,7 +259,7 @@ RadialSweepView RadialMenuExample::CreateSweepView( std::string imageName,
   radialSweepView.SetInitialSector( Degree(0.0f) );
   radialSweepView.SetFinalSector( Degree(359.999f) );
   radialSweepView.SetSize( Stage::GetCurrent().GetSize());
-  radialSweepView.SetEasingFunction( Dali::AlphaFunctions::EaseInOut );
+  radialSweepView.SetEasingFunction( Dali::AlphaFunction::EASE_IN_OUT );
   radialSweepView.SetPositionInheritanceMode(USE_PARENT_POSITION);
   mContents.Add(radialSweepView);
   radialSweepView.Add( mImageActor );
index 1062406..44ec95d 100644 (file)
@@ -67,11 +67,13 @@ float HoldZeroFastEaseInOutHoldOne(float progress)
   }
   else if(progress < 0.5f)
   {
-    return AlphaFunctions::EaseIn((progress-0.2) / 0.3f) * 0.5f;
+    progress = (progress-0.2) / 0.3f;
+    return  progress*progress*progress*0.5f;
   }
   else if(progress < 0.8f)
   {
-    return AlphaFunctions::EaseOut((progress - 0.5f) / 0.3f) * 0.5f + 0.5f;
+    progress = ((progress - 0.5f) / 0.3f) - 1.0f;
+    return (progress*progress*progress+1.0f) * 0.5f + 0.5f;
   }
   else
   {
index d459b45..da7a64b 100644 (file)
@@ -353,8 +353,8 @@ private:
         mScrollViewEffect = ScrollViewDepthEffect::New();
         mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
         mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
-        mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOut);
-        mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOut);
+        mScrollView.SetScrollSnapAlphaFunction(AlphaFunction::EASE_OUT);
+        mScrollView.SetScrollFlickAlphaFunction(AlphaFunction::EASE_OUT);
         mScrollView.RemoveConstraintsFromChildren();
         break;
       }
@@ -364,8 +364,8 @@ private:
         mScrollViewEffect = ScrollViewCubeEffect::New();
         mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
         mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
-        mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOutBack);
-        mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOutBack);
+        mScrollView.SetScrollSnapAlphaFunction(AlphaFunction::EASE_OUT_BACK);
+        mScrollView.SetScrollFlickAlphaFunction(AlphaFunction::EASE_OUT_BACK);
         mScrollView.RemoveConstraintsFromChildren();
         break;
       }
@@ -375,8 +375,8 @@ private:
         mScrollViewEffect = ScrollViewPageCarouselEffect::New();
         mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
         mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
-        mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOut);
-        mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOut);
+        mScrollView.SetScrollSnapAlphaFunction(AlphaFunction::EASE_OUT);
+        mScrollView.SetScrollFlickAlphaFunction(AlphaFunction::EASE_OUT);
         mScrollView.RemoveConstraintsFromChildren();
         break;
       }
@@ -386,8 +386,8 @@ private:
         mScrollViewEffect = ScrollViewPageCubeEffect::New();
         mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
         mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
-        mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOut);
-        mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOut);
+        mScrollView.SetScrollSnapAlphaFunction(AlphaFunction::EASE_OUT);
+        mScrollView.SetScrollFlickAlphaFunction(AlphaFunction::EASE_OUT);
         mScrollView.RemoveConstraintsFromChildren();
         break;
       }
@@ -397,8 +397,8 @@ private:
         mScrollViewEffect = ScrollViewPageSpiralEffect::New();
         mScrollView.SetScrollSnapDuration(EFFECT_SNAP_DURATION);
         mScrollView.SetScrollFlickDuration(EFFECT_FLICK_DURATION);
-        mScrollView.SetScrollSnapAlphaFunction(AlphaFunctions::EaseOut);
-        mScrollView.SetScrollFlickAlphaFunction(AlphaFunctions::EaseOut);
+        mScrollView.SetScrollSnapAlphaFunction(AlphaFunction::EASE_OUT);
+        mScrollView.SetScrollFlickAlphaFunction(AlphaFunction::EASE_OUT);
         mScrollView.RemoveConstraintsFromChildren();
         break;
       }
@@ -607,7 +607,7 @@ private:
       {
         // Spin the Image a few times.
         Animation animation = Animation::New(SPIN_DURATION);
-        animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunctions::EaseOut );
+        animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), Quaternion( Radian( Degree(360.0f * SPIN_DURATION) ), Vector3::XAXIS ), AlphaFunction::EASE_OUT );
         animation.Play();
       }
     }
index b06a7fd..7e3a22a 100644 (file)
@@ -277,7 +277,7 @@ public:
 
     // Want to animate angle from 30 => -30 and back again smoothly.
 
-    mSceneAnimation.AnimateTo( Property( mImageActor2, angleIndex ), Property::Value(-Dali::ANGLE_30), AlphaFunctions::Sin );
+    mSceneAnimation.AnimateTo( Property( mImageActor2, angleIndex ), Property::Value(-Dali::ANGLE_30), AlphaFunction::SIN );
 
     mSceneAnimation.SetLooping(true);
     mSceneAnimation.Play();
index 8529904..3023974 100644 (file)
@@ -99,7 +99,7 @@ public:
       {
         if( mAnimation )
         {
-          mAnimation.AnimateBy( Property(mTableView, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunctions::Linear );
+          mAnimation.AnimateBy( Property(mTableView, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunction::LINEAR );
           mAnimation.Play();
           mLastPoint = localPoint;
         }
index 436b213..78ded00 100644 (file)
@@ -104,7 +104,7 @@ public:
       {
         if( mAnimation )
         {
-          mAnimation.AnimateBy( Property(mTableView, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunctions::Linear );
+          mAnimation.AnimateBy( Property(mTableView, Actor::Property::POSITION), Vector3( 0.f, localPoint - mLastPoint, 0.f ), AlphaFunction::LINEAR );
           mAnimation.Play();
           mLastPoint = localPoint;
         }