Edit

Share via


CLinearTransitionFromSpeed Class

Encapsulates a linear-speed transition.

Syntax

class CLinearTransitionFromSpeed : public CBaseTransition;

Members

Public Constructors

Name Description
CLinearTransitionFromSpeed::CLinearTransitionFromSpeed Constructs a linear-speed transition object and initializes it with speed and final value.

Public Methods

Name Description
CLinearTransitionFromSpeed::Create Calls the transition library to create encapsulated transition COM object. (Overrides CBaseTransition::Create.)

Public Data Members

Name Description
CLinearTransitionFromSpeed::m_dblFinalValue The value of the animation variable at the end of the transition.
CLinearTransitionFromSpeed::m_dblSpeed The absolute value of the variable's velocity.

Remarks

During a linear-speed transition, the value of the animation variable changes at a specified rate. The duration of the transition is determined by the difference between the initial value and the specified final value. 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.

Inheritance Hierarchy

CObject

CBaseTransition

CLinearTransitionFromSpeed

Requirements

Header: afxanimationcontroller.h

CLinearTransitionFromSpeed::CLinearTransitionFromSpeed

Constructs a linear-speed transition object and initializes it with speed and final value.

CLinearTransitionFromSpeed(
    DOUBLE dblSpeed,
    DOUBLE dblFinalValue);

Parameters

dblSpeed
The absolute value of the variable's velocity.

dblFinalValue
The value of the animation variable at the end of the transition.

CLinearTransitionFromSpeed::Create

Calls the transition library to create encapsulated transition COM object.

virtual BOOL Create(
    IUIAnimationTransitionLibrary* pLibrary,
    IUIAnimationTransitionFactory* \*not used*\);

Parameters

pLibrary
A pointer to an IUIAnimationTransitionLibrary interface, which defines a library of standard transitions.

Return Value

TRUE if transition is created successfully; otherwise FALSE.

CLinearTransitionFromSpeed::m_dblFinalValue

The value of the animation variable at the end of the transition.

DOUBLE m_dblFinalValue;

CLinearTransitionFromSpeed::m_dblSpeed

The absolute value of the variable's velocity.

DOUBLE m_dblSpeed;

See also

Classes