| description | Learn more about: CAnimationPoint class | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| title | CAnimationPoint class | ||||||||||||
| ms.date | 01/05/2022 | ||||||||||||
| f1_keywords |
|
||||||||||||
| helpviewer_keywords |
|
Implements the functionality of a point whose coordinates can be animated.
class CAnimationPoint : public CAnimationBaseObject;| Name | Description |
|---|---|
CAnimationPoint::CAnimationPoint |
Overloaded. Constructs CAnimationPoint object. |
| Name | Description |
|---|---|
CAnimationPoint::AddTransition |
Adds transitions for X and Y coordinates. |
CAnimationPoint::GetDefaultValue |
Returns the default values for X and Y coordinates. |
CAnimationPoint::GetValue |
Returns current value. |
CAnimationPoint::GetX |
Provides access to the CAnimationVariable X coordinate. |
CAnimationPoint::GetY |
Provides access to the CAnimationVariable Y coordinate. |
CAnimationPoint::SetDefaultValue |
Sets the default value. |
| Name | Description |
|---|---|
CAnimationPoint::GetAnimationVariableList |
Puts the encapsulated animation variables into a list. Overrides CAnimationBaseObject::GetAnimationVariableList |
| Name | Description |
|---|---|
CAnimationPoint::operator CPoint |
Converts a CAnimationPoint to a CPoint. |
CAnimationPoint::operator= |
Assigns ptSrc to CAnimationPoint. |
| Name | Description |
|---|---|
CAnimationPoint::m_xValue |
The encapsulated animation variable that represents the X coordinate of the animation point. |
CAnimationPoint::m_yValue |
The encapsulated animation variable that represents the Y coordinate of the animation point. |
The CAnimationPoint class encapsulates two CAnimationVariable objects and can represent in applications a point. For example, you can use this class to animate a position of any object on the screen such as a text string, circle, point, and so on. To use this class in an 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 X and/or Y coordinates.
CObject
CAnimationBaseObject
CAnimationPoint
Header: afxanimationcontroller.h
Adds transitions for X and Y coordinates.
void AddTransition(
CBaseTransition* pXTransition,
CBaseTransition* pYTransition);pXTransition
A pointer to transition for X coordinates.
pYTransition
A pointer to transition for Y coordinate.
Call this function to add the specified transitions to the internal list of transitions to be applied to animation variables for X and Y coordinates. When you add transitions, they aren't applied immediately and stored in an internal list. Transitions are applied (added to a storyboard for a particular value) when you call CAnimationController::AnimateGroup. If you don't need to apply a transition to one of coordinates, you can pass NULL.
Constructs a CAnimationPoint object.
CAnimationPoint();
CAnimationPoint(
const CPoint& ptDefault,
UINT32 nGroupID,
UINT32 nObjectID = (UINT32)-1,
DWORD dwUserData = 0);ptDefault
Specifies default point coordinates.
nGroupID
Specifies Group ID.
nObjectID
Specifies Object ID.
dwUserData
Specifies user-defined data.
Constructs a CAnimationPoint object with default properties. The default point coordinates, Group ID and Object ID, are set to zero.
Puts the encapsulated animation variables into a list.
virtual void GetAnimationVariableList(CList<CAnimationVariable*, CAnimationVariable*>& lst);lst
When the function returns, it contains pointers to two CAnimationVariable objects representing the X and Y coordinates.
Returns the default values for X and Y coordinates.
CPoint GetDefaultValue();A point containing default value.
Call this function to retrieve default value, which was previously set by constructor or SetDefaultValue.
Returns current value.
BOOL GetValue(CPoint& ptValue);ptValue
Output. Contains the current value when this method returns.
TRUE, if the current value was successfully retrieved; otherwise FALSE.
Call this function to retrieve the current value of the animation point. If this method fails or underlying COM objects for X and Y coordinates haven't been initialized, ptValue contains the default value previously set in the constructor or by SetDefaultValue.
Provides access to CAnimationVariable for the X coordinate.
CAnimationVariable& GetX();A reference to encapsulated CAnimationVariable representing X coordinate.
You can call this method to get direct access to underlying CAnimationVariable representing X coordinate.
Provides access to CAnimationVariable for the Y coordinate.
CAnimationVariable& GetY();A reference to the encapsulated CAnimationVariable representing the Y coordinate.
You can call this method to get direct access to the underlying CAnimationVariable representing the Y coordinate.
The encapsulated animation variable that represents the X coordinate of the animation point.
CAnimationVariable m_xValue;The encapsulated animation variable that represents the Y coordinate of the animation point.
CAnimationVariable m_yValue;Converts a CAnimationPoint to a CPoint.
operator CPoint();Current value of CAnimationPoint as CPoint.
This function internally calls GetValue. If GetValue fails, the returned point will contain default values for the X and Y coordinates.
Assigns ptSrc to CAnimationPoint.
void operator=(const CPoint& ptSrc);ptSrc
Refers to CPoint or POINT.
Assigns ptSrc to CAnimationPoint. It's recommended to do that before animation start, because this operator calls SetDefaultValue, which recreates the underlying COM objects for the X and Y coordinates if they've been created. If you subscribed this animation object to events (ValueChanged or IntegerValueChanged), re-enable these events.
Sets the default value.
void SetDefaultValue(const POINT& ptDefault);ptDefault
Specifies the default point value.
Use this function to set a default value to animation object. This method assigns default values to X and Y coordinates of animation point. It also recreates underlying COM objects if they've been created. If you subscribed this animation object to events (ValueChanged or IntegerValueChanged), re-enable these events.