description | title | ms.date | f1_keywords | helpviewer_keywords | ms.assetid | |||
---|---|---|---|---|---|---|---|---|
Learn more about: CAccelerateDecelerateTransition Class |
CAccelerateDecelerateTransition Class |
11/04/2016 |
|
|
b1f31ee8-bb11-4ccc-b124-365fb02b025c |
Implements an accelerate-decelerate transition.
class CAccelerateDecelerateTransition : public CBaseTransition;
Name | Description |
---|---|
CAccelerateDecelerateTransition::CAccelerateDecelerateTransition | Constructs a transition object. |
Name | Description |
---|---|
CAccelerateDecelerateTransition::Create | Calls the transition library to create encapsulated transition COM object. (Overrides CBaseTransition::Create.) |
Name | Description |
---|---|
CAccelerateDecelerateTransition::m_accelerationRatio | The ratio of the time spent accelerating to the duration. |
CAccelerateDecelerateTransition::m_decelerationRatio | The ratio of the time spent decelerating to the duration. |
CAccelerateDecelerateTransition::m_duration | The duration of the transition. |
CAccelerateDecelerateTransition::m_finalValue | The value of the animation variable at the end of the transition. |
During an accelerate-decelerate transition, the animation variable speeds up and then slows down over the duration of the transition, ending at a specified value. You can control how quickly the variable accelerates and decelerates independently, by specifying different acceleration and deceleration ratios. When the initial velocity is zero, the acceleration ratio is the fraction of the duration that the variable will spend accelerating; likewise with the deceleration ratio. If the initial velocity is non-zero, it is the fraction of the time between the velocity reaching zero and the end of transition. The acceleration ratio and the deceleration ratio should sum to a maximum of 1.0. Because all transitions are cleared automatically, it's recommended to allocated them using operator new. The encapsulated IUIAnimationTransition COM object is created by CAnimationController::AnimateGroup, until then it's NULL. Changing member variables after creation of this COM object has no effect.
CAccelerateDecelerateTransition
Header: afxanimationcontroller.h
Constructs a transition object.
CAccelerateDecelerateTransition(
UI_ANIMATION_SECONDS duration,
DOUBLE finalValue,
DOUBLE accelerationRatio = 0.3,
DOUBLE decelerationRatio = 0.3);
duration
The duration of the transition.
finalValue
The value of the animation variable at the end of the transition.
accelerationRatio
The ratio of the time spent accelerating to the duration.
decelerationRatio
The ratio of the time spent decelerating to the duration.
Calls the transition library to create encapsulated transition COM object.
virtual BOOL Create(
IUIAnimationTransitionLibrary* pLibrary,
IUIAnimationTransitionFactory* *\not used*\);
pLibrary
A pointer to an IUIAnimationTransitionLibrary interface, which defines a library of standard transitions.
TRUE if transition is created successfully; otherwise FALSE.
The ratio of the time spent accelerating to the duration.
DOUBLE m_accelerationRatio;
The ratio of the time spent decelerating to the duration.
DOUBLE m_decelerationRatio;
The duration of the transition.
UI_ANIMATION_SECONDS m_duration;
The value of the animation variable at the end of the transition.
DOUBLE m_finalValue;