次の方法で共有


CAnimationColor Class

Implements the functionality of a color whose red, green, and blue components can be animated.

class CAnimationColor : public CAnimationBaseObject;

Members

Public Constructors

Name

Description

CAnimationColor::CAnimationColor

Overloaded. Constructs an animation color object.

Public Methods

Name

Description

CAnimationColor::AddTransition

Adds transitions for Red, Green and Blue components.

CAnimationColor::GetB

Provides access to CAnimationVariable representing Blue component.

CAnimationColor::GetDefaultValue

Returns the default values for color components.

CAnimationColor::GetG

Provides access to CAnimationVariable representing Green component.

CAnimationColor::GetR

Provides access to CAnimationVariable representing Red component.

CAnimationColor::GetValue

Returns current value.

CAnimationColor::SetDefaultValue

Sets default value.

Protected Methods

Name

Description

CAnimationColor::GetAnimationVariableList

Puts the encapsulated animation variables into a list. (Overrides CAnimationBaseObject::GetAnimationVariableList.)

Public Operators

Name

Description

CAnimationColor::operator COLORREF

CAnimationColor::operator=

Assigns color to CAnimationColor.

Protected Data Members

Name

Description

CAnimationColor::m_bValue

The encapsulated animation variable that represents Blue component of animation color.

CAnimationColor::m_gValue

The encapsulated animation variable that represents Green component of animation color.

CAnimationColor::m_rValue

The encapsulated animation variable that represents Red component of animation color.

Remarks

The CAnimationColor class encapsulates three CAnimationVariable objects and can represent in applications a color. For example, you can use this class to animate colors of any object on the screen (like text color, background color etc). To use this class in application, just instantiate an object of this class, add it to animation controller using CAnimationController::AddAnimationObject and call AddTransition for each transition to be applied to Red, Green and Blue components.

Inheritance Hierarchy

CObject

CAnimationBaseObject

CAnimationColor

Requirements

Header: afxanimationcontroller.h

See Also

Other Resources

MFC Classes