// Set up a scrollView...
ScrollView scrollView = ScrollView::New();
- scrollView.SetScrollSnapAlphaFunction( AlphaFunctions::EaseIn );
- DALI_TEST_CHECK( scrollView.GetScrollSnapAlphaFunction() == AlphaFunctions::EaseIn );
- scrollView.SetScrollSnapAlphaFunction( AlphaFunctions::EaseOut );
- DALI_TEST_CHECK( scrollView.GetScrollSnapAlphaFunction() == AlphaFunctions::EaseOut );
-
- scrollView.SetScrollFlickAlphaFunction( AlphaFunctions::Bounce );
- DALI_TEST_CHECK( scrollView.GetScrollFlickAlphaFunction() == AlphaFunctions::Bounce );
- scrollView.SetScrollFlickAlphaFunction( AlphaFunctions::BounceBack );
- DALI_TEST_CHECK( scrollView.GetScrollFlickAlphaFunction() == AlphaFunctions::BounceBack );
+ scrollView.SetScrollSnapAlphaFunction( AlphaFunction::EASE_IN );
+ DALI_TEST_CHECK( scrollView.GetScrollSnapAlphaFunction().GetBuiltinFunction() == AlphaFunction::EASE_IN );
+ scrollView.SetScrollSnapAlphaFunction( AlphaFunction::EASE_OUT );
+ DALI_TEST_CHECK( scrollView.GetScrollSnapAlphaFunction().GetBuiltinFunction() == AlphaFunction::EASE_OUT );
+
+ scrollView.SetScrollFlickAlphaFunction( AlphaFunction::BOUNCE );
+ DALI_TEST_CHECK( scrollView.GetScrollFlickAlphaFunction().GetBuiltinFunction() == AlphaFunction::BOUNCE );
+
END_TEST;
}
if( 0 == alphaFunctionLut.size() )
{
// coding convention is uppercase enums
- alphaFunctionLut["DEFAULT"] = AlphaFunctions::Default;
- alphaFunctionLut["LINEAR"] = AlphaFunctions::Linear;
- alphaFunctionLut["SQUARE"] = AlphaFunctions::Square;
- alphaFunctionLut["REVERSE"] = AlphaFunctions::Reverse;
- alphaFunctionLut["EASE_IN"] = AlphaFunctions::EaseIn;
- alphaFunctionLut["EASE_OUT"] = AlphaFunctions::EaseOut;
- alphaFunctionLut["EASE_IN_OUT"] = AlphaFunctions::EaseInOut;
- alphaFunctionLut["EASE_IN_SINE"] = AlphaFunctions::EaseInSine;
- alphaFunctionLut["EASE_OUT_SINE"] = AlphaFunctions::EaseOutSine;
- alphaFunctionLut["EASE_IN_OUT_SINE"] = AlphaFunctions::EaseInOutSine;
- alphaFunctionLut["EASE_IN_SINE_33"] = AlphaFunctions::EaseInSine33;
- alphaFunctionLut["EASE_OUT_SINE_33"] = AlphaFunctions::EaseOutSine33;
- alphaFunctionLut["EASE_IN_OUT_SINE_33"] = AlphaFunctions::EaseInOutSine33;
- alphaFunctionLut["EASE_IN_OUT_SINE_50"] = AlphaFunctions::EaseInOutSine50;
- alphaFunctionLut["EASE_IN_OUT_SINE_60"] = AlphaFunctions::EaseInOutSine60;
- alphaFunctionLut["EASE_IN_OUT_SINE_70"] = AlphaFunctions::EaseInOutSine70;
- alphaFunctionLut["EASE_IN_OUT_SINE_80"] = AlphaFunctions::EaseInOutSine80;
- alphaFunctionLut["EASE_IN_OUT_SINE_90"] = AlphaFunctions::EaseInOutSine90;
- alphaFunctionLut["DOUBLE_EASE_IN_OUT_SINE_60"] = AlphaFunctions::DoubleEaseInOutSine60;
- alphaFunctionLut["EASE_OUT_QUINT_50"] = AlphaFunctions::EaseOutQuint50;
- alphaFunctionLut["EASE_OUT_QUINT_80"] = AlphaFunctions::EaseOutQuint80;
- alphaFunctionLut["BOUNCE"] = AlphaFunctions::Bounce;
- alphaFunctionLut["BOUNCE_BACK"] = AlphaFunctions::BounceBack;
- alphaFunctionLut["EASE_IN_BACK"] = AlphaFunctions::EaseInBack;
- alphaFunctionLut["EASE_OUT_BACK"] = AlphaFunctions::EaseOutBack;
- alphaFunctionLut["EASE_IN_OUT_BACK"] = AlphaFunctions::EaseInOutBack;
- alphaFunctionLut["SIN"] = AlphaFunctions::Sin;
- alphaFunctionLut["SIN2X"] = AlphaFunctions::Sin2x;
+ alphaFunctionLut["DEFAULT"] = AlphaFunction(AlphaFunction::DEFAULT);
+ alphaFunctionLut["LINEAR"] = AlphaFunction(AlphaFunction::LINEAR);
+ alphaFunctionLut["REVERSE"] = AlphaFunction(AlphaFunction::REVERSE);
+ alphaFunctionLut["EASE_IN_SQUARE"] = AlphaFunction(AlphaFunction::EASE_IN_SQUARE);
+ alphaFunctionLut["EASE_OUT_SQUARE"] = AlphaFunction(AlphaFunction::EASE_OUT_SQUARE);
+ alphaFunctionLut["EASE_IN"] = AlphaFunction(AlphaFunction::EASE_IN);
+ alphaFunctionLut["EASE_OUT"] = AlphaFunction(AlphaFunction::EASE_OUT);
+ alphaFunctionLut["EASE_IN_OUT"] = AlphaFunction(AlphaFunction::EASE_IN_OUT);
+ alphaFunctionLut["EASE_IN_SINE"] = AlphaFunction(AlphaFunction::EASE_IN_SINE);
+ alphaFunctionLut["EASE_OUT_SINE"] = AlphaFunction(AlphaFunction::EASE_OUT_SINE);
+ alphaFunctionLut["EASE_IN_OUT_SINE"] = AlphaFunction(AlphaFunction::EASE_IN_OUT_SINE);
+ alphaFunctionLut["BOUNCE"] = AlphaFunction(AlphaFunction::BOUNCE);
+ alphaFunctionLut["SIN"] = AlphaFunction(AlphaFunction::SIN);
+ alphaFunctionLut["EASE_OUT_BACK"] = AlphaFunction(AlphaFunction::EASE_OUT_BACK);
}
const AlphaFunctionLut::const_iterator iter( alphaFunctionLut.find( alphaFunction ) );
else
{
DALI_ASSERT_ALWAYS( iter != alphaFunctionLut.end() && "Unknown Anchor Constant" );
- return Dali::AlphaFunctions::Default;
+ return Dali::AlphaFunction::DEFAULT;
}
}
}
// these are the defaults
- AlphaFunction alphaFunction( AlphaFunctions::Default );
+ AlphaFunction alphaFunction( AlphaFunction::DEFAULT );
TimePeriod timePeriod( 0.f );
OptionalChild timeChild = IsChild( pKeyChild.second, "time-period" );
throw;
}
- AlphaFunction kfAlphaFunction( AlphaFunctions::Default );
+ AlphaFunction kfAlphaFunction( AlphaFunction::DEFAULT );
if( OptionalString alphaFuncStr = constant.IsString( IsChild(pKeyChild.second, "alpha-function") ) )
{
kfAlphaFunction = GetAlphaFunction( *alphaFuncStr );
unsigned int groupIdx = mCurrentUniform / mNumBubblePerShader;
SetBubbleParameter( mEffect[groupIdx], curUniform, emitPosition, direction, displacement);
animation.AnimateTo( Property( mEffect[groupIdx], mEffect[groupIdx].GetPercentagePropertyName(curUniform) ),
- 1.f, AlphaFunctions::Linear );
+ 1.f, AlphaFunction::LINEAR );
if( mCurrentUniform % mNumShader == 0 )
{
unsigned int uniform = mCurrentUniform / mNumShader;
SetBubbleParameter(mEffectForNoise, uniform, emitPosition, displacement);
animation.AnimateTo( Property( mEffectForNoise, mEffectForNoise.GetPercentagePropertyName(uniform) ),
- 1.f, AlphaFunctions::Linear );
+ 1.f, AlphaFunction::LINEAR );
}
mCurrentUniform = (mCurrentUniform + 1) % mTotalNumOfBubble;
for(unsigned int i=0; i < mNumShader; i++ )
{
animation.AnimateTo( Property( mEffect[i], mEffect[i].GetMagnificationPropertyName() ),
- multiple, AlphaFunctions::EaseOut);
+ multiple, AlphaFunction::EASE_OUT);
}
animation.AnimateTo( Property( mEffectForNoise, mEffectForNoise.GetMagnificationPropertyName() ),
- multiple, AlphaFunctions::EaseOut);
+ multiple, AlphaFunction::EASE_OUT);
animation.Play();
animation.FinishedSignal().Connect(this, &BubbleEmitter::OnExplosionFinished);
#include <string>
// INTERNAL INCLUDES
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
#include <dali-toolkit/public-api/controls/table-view/table-view.h>
#include <dali-toolkit/public-api/controls/navigation-frame/page.h>
#include <dali-toolkit/public-api/controls/navigation-frame/navigation-bar-style.h>
mTitleBar(NULL),
mOrientationAngle( 0 ),
mOrientationAnimationDuration( 1.0f ),
- mOrientationAnimationAlphaFunc( AlphaFunctions::EaseOut ),
+ mOrientationAnimationAlphaFunc( AlphaFunction::EASE_OUT ),
mItemPositionCoefficient( Vector3( 0.0f, 1.0f, 0.0f) ),
mItemPushedSignal( ),
mItemPoppedSignal( )
animation.AnimateTo( Property( mTurnEffect[mIndex], mTurnEffect[mIndex].PageTurnEffect::GetCurrentCenterPropertyName() ),
originalCenter,
- AlphaFunctions::EaseOut, PAGE_TURN_OVER_ANIMATION_DURATION*0.75f );
- animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), AngleAxis( Degree( 180.0f ), Vector3::YAXIS ) ,AlphaFunctions::EaseOut );
+ AlphaFunction::EASE_OUT, TimePeriod(PAGE_TURN_OVER_ANIMATION_DURATION*0.75f) );
+ animation.AnimateBy( Property( actor, Actor::Property::ORIENTATION ), AngleAxis( Degree( 180.0f ), Vector3::YAXIS ) ,AlphaFunction::EASE_OUT );
animation.Play();
ImageActor::DownCast(actor).SetCullFace( CullBack );
animation.FinishedSignal().Connect( this, &PageTurnPortraitView::OnTurnedOver );
float width = mPageSize.width*(1.f+PAGE_TURN_OVER_THRESHOLD_RATIO);
Animation animation = Animation::New( std::max(0.1f,PAGE_TURN_OVER_ANIMATION_DURATION * (1.0f - mPanDisplacement / width)) );
animation.AnimateTo( Property(self, mPropertyPanDisplacement[mIndex]),
- width,AlphaFunctions::EaseOutSine33);
+ width,AlphaFunction::EASE_OUT_SINE);
animation.AnimateTo( Property(self, mPropertyCurrentCenter[mIndex]),
- Vector2(-mPageSize.width, 0.5f*mPageSize.height), AlphaFunctions::EaseOutSine33);
+ Vector2(-mPageSize.width, 0.5f*mPageSize.height), AlphaFunction::EASE_OUT_SINE);
mAnimationActorPair[animation] = actor;
mAnimationIndexPair[animation] = mIndex;
animation.Play();
{
Animation animation= Animation::New( PAGE_SLIDE_BACK_ANIMATION_DURATION * (mOriginalCenter.x - mCurrentCenter.x) / mPageSize.width / PAGE_TURN_OVER_THRESHOLD_RATIO );
animation.AnimateTo( Property( mTurnEffect[mIndex], mTurnEffect[mIndex].PageTurnEffect::GetCurrentCenterPropertyName() ),
- mOriginalCenter, AlphaFunctions::Linear );
+ mOriginalCenter, AlphaFunction::LINEAR );
mAnimationActorPair[animation] = actor;
mAnimationIndexPair[animation] = mIndex;
animation.Play();
if(mShowing)
{
- mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
- mAnimation.AnimateTo( Property(self, Actor::Property::SCALE), targetSize, AlphaFunctions::EaseInOut, TimePeriod(duration * 0.5f, duration * 0.5f) );
+ mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunction::EASE_IN_OUT, TimePeriod(0.0f, duration * 0.5f) );
+ mAnimation.AnimateTo( Property(self, Actor::Property::SCALE), targetSize, AlphaFunction::EASE_IN_OUT, TimePeriod(duration * 0.5f, duration * 0.5f) );
}
else
{
- mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
- mAnimation.AnimateTo( Property(self, Actor::Property::SCALE), targetSize, AlphaFunctions::EaseInOut, TimePeriod(0.0f, duration * 0.5f) );
+ mAnimation.AnimateTo( Property(mBacking, Actor::Property::COLOR_ALPHA), targetBackingAlpha, AlphaFunction::EASE_IN_OUT, TimePeriod(0.0f, duration * 0.5f) );
+ mAnimation.AnimateTo( Property(self, Actor::Property::SCALE), targetSize, AlphaFunction::EASE_IN_OUT, TimePeriod(0.0f, duration * 0.5f) );
}
mAnimation.Play();
mAnimation.FinishedSignal().Connect(this, &Popup::OnStateAnimationFinished);
if(mIndicatorShowDuration > 0.0f)
{
mAnimation = Animation::New( mIndicatorShowDuration );
- mAnimation.AnimateTo( Property( self, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn );
+ mAnimation.AnimateTo( Property( self, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::EASE_IN );
mAnimation.Play();
}
else
if(mIndicatorHideDuration > 0.0f)
{
mAnimation = Animation::New( mIndicatorHideDuration );
- mAnimation.AnimateTo( Property( self, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn );
+ mAnimation.AnimateTo( Property( self, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN );
mAnimation.Play();
}
else
}
mAnimation = Animation::New( BAR_SHOW_TIME );
- mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn );
- mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunctions::EaseIn );
+ mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::EASE_IN );
+ mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 1.0f, AlphaFunction::EASE_IN );
mAnimation.Play();
DestructTimer();
}
mAnimation = Animation::New( BAR_HIDE_TIME );
- mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn );
- mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn );
+ mAnimation.AnimateTo( Property( mSlider, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN );
+ mAnimation.AnimateTo( Property( mSliderWrap, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN );
mAnimation.Play();
}
* // start the bouncing animation
* Animation anim = Animation::New(2.0f);
- * anim.AnimateTo( Property( bounceActor, bouncePropertyIndex ), 1.f, AlphaFunctions::Sin );
+ * anim.AnimateTo( Property( bounceActor, bouncePropertyIndex ), 1.f, AlphaFunction::SIN );
* anim.Play();
* @endcode
*
{
RemoveAnimation(mScrollAnimation);
mScrollAnimation = Animation::New(durationSeconds);
- mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
- mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, targetSize), AlphaFunctions::EaseOut );
+ mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunction::EASE_OUT );
+ mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, targetSize), AlphaFunction::EASE_OUT );
mScrollAnimation.FinishedSignal().Connect(this, &ItemView::OnLayoutActivationScrollFinished);
mScrollAnimation.Play();
}
, DEFAULT_MINIMUM_SWIPE_DURATION, DEFAULT_MAXIMUM_SWIPE_DURATION);
mScrollAnimation = Animation::New(flickAnimationDuration);
- mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
- mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunctions::EaseOut );
- mScrollAnimation.AnimateTo( Property(self, mPropertyScrollSpeed), 0.0f, AlphaFunctions::EaseOut );
+ mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunction::EASE_OUT );
+ mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunction::EASE_OUT );
+ mScrollAnimation.AnimateTo( Property(self, mPropertyScrollSpeed), 0.0f, AlphaFunction::EASE_OUT );
mIsFlicking = true;
// Check whether it has already scrolled to the end
float anchorPosition = mActiveLayout->GetClosestAnchorPosition( GetCurrentLayoutPosition(0) );
anchoringAnimation = Animation::New(mAnchoringDuration);
- anchoringAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), anchorPosition, AlphaFunctions::EaseOut );
- anchoringAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(anchorPosition, self.GetCurrentSize()), AlphaFunctions::EaseOut );
- anchoringAnimation.AnimateTo( Property(self, mPropertyScrollSpeed), 0.0f, AlphaFunctions::EaseOut );
+ anchoringAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), anchorPosition, AlphaFunction::EASE_OUT );
+ anchoringAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(anchorPosition, self.GetCurrentSize()), AlphaFunction::EASE_OUT );
+ anchoringAnimation.AnimateTo( Property(self, mPropertyScrollSpeed), 0.0f, AlphaFunction::EASE_OUT );
if(!mIsFlicking)
{
AnimateScrollOvershoot(0.0f);
{
RemoveAnimation(mScrollAnimation);
mScrollAnimation = Animation::New(durationSeconds);
- mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
- mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunctions::EaseOut );
+ mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunction::EASE_OUT );
+ mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunction::EASE_OUT );
mScrollAnimation.FinishedSignal().Connect(this, &ItemView::OnScrollFinished);
mScrollAnimation.Play();
}
{
RemoveAnimation(mScrollAnimation);
mScrollAnimation = Animation::New(duration);
- mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunctions::EaseOut );
- mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunctions::EaseOut );
+ mScrollAnimation.AnimateTo( Property( mScrollPositionObject, ScrollConnector::SCROLL_POSITION ), firstItemScrollPosition, AlphaFunction::EASE_OUT );
+ mScrollAnimation.AnimateTo( Property(self, mPropertyPosition), GetScrollPosition(firstItemScrollPosition, layoutSize), AlphaFunction::EASE_OUT );
mScrollAnimation.FinishedSignal().Connect(this, &ItemView::OnScrollFinished);
mScrollAnimation.Play();
}
// EXTERNAL INCLUDES
#include <dali/public-api/animation/animation.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/object/ref-object.h>
// EXTERNAL INCLUDES
#include <dali/public-api/animation/animation.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/object/ref-object.h>
// EXTERNAL INCLUDES
#include <dali/public-api/animation/animation.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/object/ref-object.h>
*/
struct InternalFinalConstraint
{
- InternalFinalConstraint(AlphaFunction functionX,
- AlphaFunction functionY)
+ InternalFinalConstraint(AlphaFunctionPrototype functionX,
+ AlphaFunctionPrototype functionY)
: mFunctionX(functionX),
mFunctionY(functionY)
{
current = inputs[0]->GetVector3() - offset;
}
- AlphaFunction mFunctionX;
- AlphaFunction mFunctionY;
+ AlphaFunctionPrototype mFunctionX;
+ AlphaFunctionPrototype mFunctionY;
};
}
mMaxOvershoot(Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT, Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT),
mUserMaxOvershoot(Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT, Toolkit::ScrollView::DEFAULT_MAX_OVERSHOOT),
mSnapOvershootDuration(Toolkit::ScrollView::DEFAULT_SNAP_OVERSHOOT_DURATION),
- mSnapOvershootAlphaFunction(AlphaFunctions::EaseOut),
+ mSnapOvershootAlphaFunction(AlphaFunction::EASE_OUT),
mSnapDuration(Toolkit::ScrollView::DEFAULT_SLOW_SNAP_ANIMATION_DURATION),
- mSnapAlphaFunction(AlphaFunctions::EaseOut),
+ mSnapAlphaFunction(AlphaFunction::EASE_OUT),
mMinFlickDistance(DEFAULT_MIN_FLICK_DISTANCE),
mFlickSpeedThreshold(DEFAULT_MIN_FLICK_SPEED_THRESHOLD),
mFlickDuration(Toolkit::ScrollView::DEFAULT_FAST_SNAP_ANIMATION_DURATION),
- mFlickAlphaFunction(AlphaFunctions::EaseOut),
+ mFlickAlphaFunction(AlphaFunction::EASE_OUT),
mAxisAutoLockGradient(Toolkit::ScrollView::DEFAULT_AXIS_AUTO_LOCK_GRADIENT),
mFrictionCoefficient(Toolkit::ScrollView::DEFAULT_FRICTION_COEFFICIENT),
mFlickSpeedCoefficient(Toolkit::ScrollView::DEFAULT_FLICK_SPEED_COEFFICIENT),
mInternalXAnimation = Animation::New(duration);
DALI_LOG_SCROLL_STATE("[0x%X], mInternalXAnimation[0x%X]", this, mInternalXAnimation.GetObjectPtr() );
mInternalXAnimation.FinishedSignal().Connect(this, &ScrollView::OnScrollAnimationFinished);
- mInternalXAnimation.AnimateTo( Property(self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION, 0), position, alpha, duration);
+ mInternalXAnimation.AnimateTo( Property(self, Toolkit::ScrollView::Property::SCROLL_PRE_POSITION, 0), position, alpha, TimePeriod(duration));
mInternalXAnimation.Play();
// erase current state flags
// EXTERNAL INCLUDES
#include <dali/public-api/animation/animation.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/object/ref-object.h>
// EXTERNAL INCLUDES
#include <dali/public-api/animation/animation.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/object/ref-object.h>
// EXTERNAL INCLUDES
#include <dali/public-api/animation/animation.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/object/ref-object.h>
Actor scrollView = GetScrollView();
mAnimation = Animation::New(WOBBLEEFFECT_ANIMATION_MAX_TIME);
- mAnimation.AnimateTo( Property(scrollView, mPropertyTime), endTime, AlphaFunctions::Linear );
+ mAnimation.AnimateTo( Property(scrollView, mPropertyTime), endTime, AlphaFunction::LINEAR );
mAnimation.FinishedSignal().Connect(this, &ScrollViewWobbleEffect::OnAnimationFinished);
mAnimation.Play();
// EXTERNAL INCLUDES
#include <dali/public-api/animation/animation.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/object/ref-object.h>
#include <dali/public-api/actors/custom-actor.h>
mTiles[mContainerIndex][actorIndex].TranslateBy( resetTranslation );
mTiles[mContainerIndex][actorIndex].SetOrientation( Radian( angle), axis );
}
- mAnimation.AnimateTo( Property( mBoxes[actorIndex], Actor::Property::ORIENTATION ), Quaternion( Radian( -angle ), axis ), AlphaFunctions::EaseInOutSine );
+ mAnimation.AnimateTo( Property( mBoxes[actorIndex], Actor::Property::ORIENTATION ), Quaternion( Radian( -angle ), axis ), AlphaFunction::EASE_IN_OUT_SINE );
Vector3 position(mBoxes[actorIndex].GetCurrentPosition());
- mAnimation.AnimateTo( Property( mBoxes[actorIndex], Actor::Property::POSITION ), position * mDisplacementRatio + Vector3( 0.f, 0.f, mCubeDisplacement ), AlphaFunctions::Bounce );
- mAnimation.AnimateTo( Property( mTiles[mContainerIndex^1][actorIndex], Actor::Property::COLOR ), HALF_BRIGHTNESS, AlphaFunctions::EaseOut );
- mAnimation.AnimateTo( Property( mTiles[mContainerIndex][actorIndex], Actor::Property::COLOR ), FULL_BRIGHTNESS, AlphaFunctions::EaseIn );
+ mAnimation.AnimateTo( Property( mBoxes[actorIndex], Actor::Property::POSITION ), position * mDisplacementRatio + Vector3( 0.f, 0.f, mCubeDisplacement ), AlphaFunction::BOUNCE );
+ mAnimation.AnimateTo( Property( mTiles[mContainerIndex^1][actorIndex], Actor::Property::COLOR ), HALF_BRIGHTNESS, AlphaFunction::EASE_OUT );
+ mAnimation.AnimateTo( Property( mTiles[mContainerIndex][actorIndex], Actor::Property::COLOR ), FULL_BRIGHTNESS, AlphaFunction::EASE_IN );
}
} // namespace Internal
sideTile.TranslateBy( resetTranslation );
sideTile.SetOrientation( Radian( angle), Vector3::YAXIS );
}
- mAnimation.AnimateTo( Property( currentCube, Actor::Property::ORIENTATION ), Quaternion( Radian( -angle ), Vector3::YAXIS ), AlphaFunctions::Linear );
+ mAnimation.AnimateTo( Property( currentCube, Actor::Property::ORIENTATION ), Quaternion( Radian( -angle ), Vector3::YAXIS ), AlphaFunction::LINEAR );
Vector3 position(currentCube.GetCurrentPosition());
- mAnimation.AnimateTo( Property( currentCube, Actor::Property::POSITION ), Vector3( position.x*mDisplacementRatio, position.y, position.z ), AlphaFunctions::Bounce );
- mAnimation.AnimateTo( Property( frontTile, Actor::Property::COLOR ), HALF_BRIGHTNESS, AlphaFunctions::EaseOut );
- mAnimation.AnimateTo( Property( sideTile, Actor::Property::COLOR ), FULL_BRIGHTNESS, AlphaFunctions::EaseIn );
+ mAnimation.AnimateTo( Property( currentCube, Actor::Property::POSITION ), Vector3( position.x*mDisplacementRatio, position.y, position.z ), AlphaFunction::BOUNCE );
+ mAnimation.AnimateTo( Property( frontTile, Actor::Property::COLOR ), HALF_BRIGHTNESS, AlphaFunction::EASE_OUT );
+ mAnimation.AnimateTo( Property( sideTile, Actor::Property::COLOR ), FULL_BRIGHTNESS, AlphaFunction::EASE_IN );
}
} // namespace Internal
float delay = thirdAnimationDuration * CalculateDelay(x*mTileSize.width,y*mTileSize.height);
mAnimation.AnimateTo( Property( mBoxes[idx], Actor::Property::ORIENTATION ), Quaternion( Radian( Degree( -angle ) ), Vector3::YAXIS ),
- AlphaFunctions::EaseOutSine, TimePeriod( delay, thirdAnimationDuration ) );
+ AlphaFunction::EASE_OUT_SINE, TimePeriod( delay, thirdAnimationDuration ) );
mAnimation.AnimateBy( Property( mBoxes[idx], Actor::Property::POSITION ), Vector3( 0.f, 0.f, -mCubeDisplacement ),
- AlphaFunctions::Bounce, TimePeriod( delay, thirdAnimationDuration ) );
+ AlphaFunction::BOUNCE, TimePeriod( delay, thirdAnimationDuration ) );
mAnimation.AnimateTo( Property( mTiles[anotherIndex][idx], Actor::Property::COLOR ), HALF_BRIGHTNESS,
- AlphaFunctions::EaseOut, TimePeriod( delay, thirdAnimationDuration ) );
+ AlphaFunction::EASE_OUT, TimePeriod( delay, thirdAnimationDuration ) );
mAnimation.AnimateTo( Property( mTiles[mContainerIndex][idx], Actor::Property::COLOR ), FULL_BRIGHTNESS,
- AlphaFunctions::EaseIn, TimePeriod( delay, thirdAnimationDuration ) );
+ AlphaFunction::EASE_IN, TimePeriod( delay, thirdAnimationDuration ) );
}
}
*/
// INTERNAL INCLUDES
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
#include <dali-toolkit/public-api/controls/control.h>
#include <dali-toolkit/public-api/controls/navigation-frame/page.h>
#include <dali-toolkit/public-api/controls/navigation-frame/navigation-bar-style.h>
// Do a nonlinear size animation to shrink the actor first when the actor size changes,
// so that we can avoid the actors overlapping during orientation change.
- animation.AnimateTo( Property( actor, Actor::Property::SIZE ), shrink, AlphaFunctions::EaseOut, TimePeriod( 0.0f, durationSeconds * 0.5f ) );
- animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size, AlphaFunctions::EaseIn, TimePeriod( 0.0f, durationSeconds ) );
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE ), shrink, AlphaFunction::EASE_OUT, TimePeriod( 0.0f, durationSeconds * 0.5f ) );
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size, AlphaFunction::EASE_IN, TimePeriod( 0.0f, durationSeconds ) );
}
}
ItemLayout::ItemLayout()
: mOrientation( ControlOrientation::Up ),
- mAlphaFunction( AlphaFunctions::Linear ),
+ mAlphaFunction( AlphaFunction::LINEAR ),
mWeightObject()
{
}
keyFrames.Add( 1.0f, 1.0f );
Animation applyAnimation = Dali::Animation::New( durationSeconds );
- applyAnimation.AnimateBetween( Property( mWeightObject, WeightObject::WEIGHT ), keyFrames, mAlphaFunction, durationSeconds );
+ applyAnimation.AnimateBetween( Property( mWeightObject, WeightObject::WEIGHT ), keyFrames, mAlphaFunction, TimePeriod(durationSeconds) );
applyAnimation.Play();
}
}
// EXTERNAL INCLUDES
#include <boost/function.hpp>
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
#include <dali/public-api/common/vector-wrapper.h>
// INTERNAL INCLUDES
*/
// EXTERNAL INCLUDES
-#include <dali/public-api/animation/alpha-functions.h>
+#include <dali/public-api/animation/alpha-function.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/scrollable/scrollable.h>
* // Start the animation
* Animation animation = Animation::New(1.f);
* animation.AnimateTo( Property( bouncingEffect, bouncingEffect.GetProgressRatePropertyName() ),
- * 1.f, AlphaFunctions::Bounce );
+ * 1.f, AlphaFunction::BOUNCE );
* animation.Play();
*/
class DALI_IMPORT_API BouncingEffect : public ShaderEffect
* ImageActor fancyButton = ImageActor::New( ... );\n
* fancyButton.SetShaderEffect( buttonEffect );
*
- * // animate a button push, using e.g. AlphaFunctions::Bounce. With these values the button pushes in and out (animates to and fro between the two states)
+ * // animate a button push, using e.g. AlphaFunction::BOUNCE. With these values the button pushes in and out (animates to and fro between the two states)
*
*
* Animation animation = Animation::New( ... );\n
- * animation.AnimateTo( Property(buttonEffect, buttonEffect.GetStatePropertyName()), 1.0f, AlphaFunctions::Bounce, ... );\n
+ * animation.AnimateTo( Property(buttonEffect, buttonEffect.GetStatePropertyName()), 1.0f, AlphaFunction::BOUNCE, ... );\n
* animation.Play();\n
*
*/
* Animation animation[mAnimationIndex] = Animation::New( ... );\n
* animation.AnimateTo(Property( pageTurnEffect, pageTurnEffect.PageTurnEffect::GetCurrentCenterPropertyName() ),
* currentCenter,
- * AlphaFunctions::...);\n
+ * AlphaFunction::...);\n
* animation[mAnimationIndex].Play(); \n
*/
* ImageActor imageActor = ImageActor::New( ... );\n
* imageActor.SetShaderEffect( softButtonEffect );
*
- * // animate a button push, using e.g. AlphaFunctions::Bounce. With these values the button pushes in and pops out slightly at the end\n
+ * // animate a button push, using e.g. AlphaFunction::BOUNCE. With these values the button pushes in and pops out slightly at the end\n
* Animation animation = Animation::New( ... );\n
- * animation.AnimateTo( Property(softButtonEffect, softButtonEffect.GetLightingIndentationAmountPropertyName()), 0.25f, AlphaFunctions::Bounce, ... );\n
- * animation.AnimateTo( Property(softButtonEffect, softButtonEffect.GetLightingIndentationAmountPropertyName()), -0.05f, AlphaFunctions::Bounce, ... );\n
- * animation.AnimateTo( Property(softButtonEffect, softButtonEffect.GetTextureDistortionAmountPropertyName()), 0.25f, AlphaFunctions::Bounce, ... );\n
- * animation.AnimateTo( Property(softButtonEffect, softButtonEffect.GetTextureDistortionAmountPropertyName()), -0.05f, AlphaFunctions::Bounce, ... );\n
+ * animation.AnimateTo( Property(softButtonEffect, softButtonEffect.GetLightingIndentationAmountPropertyName()), 0.25f, AlphaFunction::BOUNCE, ... );\n
+ * animation.AnimateTo( Property(softButtonEffect, softButtonEffect.GetLightingIndentationAmountPropertyName()), -0.05f, AlphaFunction::BOUNCE, ... );\n
+ * animation.AnimateTo( Property(softButtonEffect, softButtonEffect.GetTextureDistortionAmountPropertyName()), 0.25f, AlphaFunction::BOUNCE, ... );\n
+ * animation.AnimateTo( Property(softButtonEffect, softButtonEffect.GetTextureDistortionAmountPropertyName()), -0.05f, AlphaFunction::BOUNCE, ... );\n
* animation.Play();\n
*
*/
AnimateBy and AnimateTo, method names are appended by 'By' or 'To' either animate to a supplied value or animate by a supplied value. For example an actor at (10,10,10) calling AnimateBy(Property(actor, Actor::Property::POSITION), 50,0,0) would mean its location is (60,0,0) whilst AnimateTo(Property(actor, Actor::Property::POSITION), 50,0,0) would result in a location (50,0,0).
- Dali::AlphaFunctions can be used to give interesting effects to the animation, for example the MOVEment of an actor on screen can speed up and slow down following a sine curve by using the Dali::AlphaFunctions::EaseInOutSine instead of AlphaFunctions::Linear.
+ Dali::AlphaFunction can be used to give interesting effects to the animation, for example the MOVEment of an actor on screen can speed up and slow down following a sine curve by using the Dali::AlphaFunction::EASE_IN_OUT_SINE instead of AlphaFunction::LINEAR
@code
- myAnimation.AnimateTo(Property(actor, Actor::Property::POSITION), Vector3(x, y, z), AlphaFunctions::Linear, delay, ANIMATOR_DURATION);
- myAnimation.AnimateTo(Property(actor, Actor::Property::SIZE), actorSize, AlphaFunctions::EaseIn, delay, ANIMATOR_DURATION);
+ myAnimation.AnimateTo(Property(actor, Actor::Property::POSITION), Vector3(x, y, z), AlphaFunction::LINEAR, delay, ANIMATOR_DURATION);
+ myAnimation.AnimateTo(Property(actor, Actor::Property::SIZE), actorSize, AlphaFunction::EASE_IN, delay, ANIMATOR_DURATION);
@endcode
\section playback-control Controlling a playing animation
* Quaternion q(Radian(Degree(45.0f)).value, Vector3::YAXIS);
* Quaternion r(Radian(Degree(30.0f)).value, Vector3::ZAXIS);
* q *= r;
- * mAnimation.AnimateTo(Property(mActor, Actor::Property::ORIENTATION), q, AlphaFunctions::EaseInOut);
+ * mAnimation.AnimateTo(Property(mActor, Actor::Property::ORIENTATION), q, AlphaFunction::EASE_IN_OUT);
* mAnimation.Play();
* @endcode
*/
* body.SetKinematic( true );
* // create a second animation to move the actor 100 units to the right
* Animation animation( Animation::New( 1 ) );
- * animation.AnimateBy( Property( actor, Actor::Property::POSITION ), Vector3( 100, 0, 0 ), AlphaFunctions::Linear );
+ * animation.AnimateBy( Property( actor, Actor::Property::POSITION ), Vector3( 100, 0, 0 ), AlphaFunction::LINEAR );
* animation.Play();
* \endcode
* <hr>
*/
const AlphaFuncStruct AlphaFunctionTable[]=
{
- {"default" , AlphaFunctions::Default },
- {"linear" , AlphaFunctions::Linear },
- {"square" , AlphaFunctions::Square },
- {"reverse" , AlphaFunctions::Reverse },
- {"easeIn" , AlphaFunctions::EaseIn },
- {"easeOut" , AlphaFunctions::EaseOut },
- {"easeInOut" , AlphaFunctions::EaseInOut },
- {"easeInSine" , AlphaFunctions::EaseInSine },
- {"easeOutSine" , AlphaFunctions::EaseOutSine },
- {"easeInOutSine" , AlphaFunctions::EaseInOutSine },
- {"easeInSine33" , AlphaFunctions::EaseInSine33 },
- {"easeOutSine33" , AlphaFunctions::EaseOutSine33 },
- {"easeInOutSine33" , AlphaFunctions::EaseInOutSine33 },
- {"easeInOutSine50" , AlphaFunctions::EaseInOutSine50 },
- {"easeInOutSine60" , AlphaFunctions::EaseInOutSine60 },
- {"easeInOutSine70" , AlphaFunctions::EaseInOutSine70 },
- {"easeInOutSine80" , AlphaFunctions::EaseInOutSine80 },
- {"easeInOutSine90" , AlphaFunctions::EaseInOutSine90 },
- {"doubleEaseInOutSine60" , AlphaFunctions::DoubleEaseInOutSine60},
- {"easeOutQuint50" , AlphaFunctions::EaseOutQuint50 },
- {"easeOutQuint80" , AlphaFunctions::EaseOutQuint80 },
- {"bounce" , AlphaFunctions::Bounce },
- {"bounceBack" , AlphaFunctions::BounceBack },
- {"easeInBack" , AlphaFunctions::EaseInBack },
- {"easeOutBack" , AlphaFunctions::EaseOutBack },
- {"easeInOutBack" , AlphaFunctions::EaseInOutBack },
- {"sin" , AlphaFunctions::Sin },
- {"sin2x" , AlphaFunctions::Sin2x }
+
+ {"default" , AlphaFunction::DEFAULT },
+ {"linear" , AlphaFunction::LINEAR },
+ {"reverse" , AlphaFunction::REVERSE },
+
+ {"easeInSquare" , AlphaFunction::EASE_IN_SQUARE },
+ {"easeOutSquare" , AlphaFunction::EASE_OUT_SQUARE },
+
+ {"easeIn" , AlphaFunction::EASE_IN },
+ {"easeOut" , AlphaFunction::EASE_OUT },
+ {"easeInOut" , AlphaFunction::EASE_IN_OUT },
+
+ {"easeInSine" , AlphaFunction::EASE_IN_SINE },
+ {"easeOutSine" , AlphaFunction::EASE_OUT_SINE },
+ {"easeInOutSine" , AlphaFunction::EASE_IN_OUT_SINE },
+
+ {"bounce" , AlphaFunction::BOUNCE },
+ {"sin" , AlphaFunction::SIN },
+ {"easeOutBack" , AlphaFunction::EASE_OUT_BACK },
+
};
const unsigned int AlphaFunctionTableCount = sizeof(AlphaFunctionTable)/sizeof(AlphaFunctionTable[0]);
const char* const DEFAULT_ALPHA_NAME = "default";
-static AlphaFunction DEFAULT_ALPHA_FUNCTION = AlphaFunctions::Default;
+static AlphaFunction DEFAULT_ALPHA_FUNCTION = AlphaFunction::DEFAULT;
}
DALI_LOG_ERROR("Failed to find alpha func |%s| \n", alphaFuncName.c_str() );
- return AlphaFunctions::Default;
+ return DEFAULT_ALPHA_FUNCTION;
}
const char* const GetAlphaFunctionName( AlphaFunction alphaFunc )
const AlphaFuncStruct& alphaStruct( AlphaFunctionTable[i] );
- if( alphaStruct.alphaFunc == alphaFunc )
+ if( alphaStruct.alphaFunc.GetBuiltinFunction() == alphaFunc.GetBuiltinFunction() )
{
return alphaStruct.name;
}