| title | CKeyFrame Class | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | reference | |||||||||||||
| f1_keywords |
|
|||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | d050a562-20f6-4c65-8ce5-ccb3aef1a20e | |||||||||||||
| caps.latest.revision | 18 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
Represents an animation keyframe.
class CKeyFrame : public CBaseKeyFrame;
| Name | Description |
|---|---|
| CKeyFrame::CKeyFrame | Overloaded. Constructs a keyframe that depends on other keyframe. |
| Name | Description |
|---|---|
| CKeyFrame::AddToStoryboard | Adds a keyframe to a storyboard. (Overrides CBaseKeyFrame::AddToStoryboard.) |
| CKeyFrame::AddToStoryboardAfterTransition | Adds a keyframe to storyboard after transition. |
| CKeyFrame::AddToStoryboardAtOffset | Adds a keyframe to storyboard at offset. |
| CKeyFrame::GetExistingKeyframe | Returns a pointer to a keyframe this keyframe depends on. |
| CKeyFrame::GetOffset | Returns an offset from other keyframe. |
| CKeyFrame::GetTransition | Returns a pointer to a transition this keyframe depends on. |
| Name | Description |
|---|---|
| CKeyFrame::m_offset | Specifies offset of this keyframe from a keyframe stored in m_pExistingKeyFrame. |
| CKeyFrame::m_pExistingKeyFrame | Stores a pointer to an existing keframe. This keyframe is added to storyboard with m_offset to the existing keyframe. |
| CKeyFrame::m_pTransition | Stores a pointer to transtion that begins at this keyframe. |
This class implements an animation keyframe. A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. A keyframe may be based on other keyframe and have an offset (in seconds) from it, or may be based on a transition and represent a moment in time when this transition ends.
Header: afxanimationcontroller.h
Adds a keyframe to a storyboard.
virtual BOOL AddToStoryboard(
IUIAnimationStoryboard* pStoryboard,
BOOL bDeepAdd);
pStoryboard
A pointer to a storyboard.
bDeepAdd
Specifies whether to add keyframe or transition recursively.
TRUE, if keyframe was added successfully.
This method adds a keyframe to storyboard. If it depends on other keyframe or transition and bDeepAdd is TRUE, this method tries to add them recursively.
Adds a keyframe to storyboard after transition.
BOOL AddToStoryboardAfterTransition(
IUIAnimationStoryboard* pStoryboard,
BOOL bDeepAdd);
pStoryboard
A pointer to a storyboard.
bDeepAdd
Specifies whether to add a transition recursively.
TRUE, if keyframe was added successfully.
This function is called by the framework to add a keyframe to storyboard after transition.
Adds a keyframe to storyboard at offset.
virtual BOOL AddToStoryboardAtOffset(
IUIAnimationStoryboard* pStoryboard,
BOOL bDeepAdd);
pStoryboard
A pointer to a storyboard.
bDeepAdd
Specifies whether to add a keyframe this keyframe depend on recursively.
TRUE, if keyframe was added successfully.
This function is called by the framework to add a keyframe to storyboard at offset.
Constructs a keyframe that depends on a transition.
CKeyFrame(CBaseTransition* pTransition);
CKeyFrame(
CBaseKeyFrame* pKeyframe,
UI_ANIMATION_SECONDS offset = 0.0);
pTransition
A pointer to a transition.
pKeyframe
A pointer to keyframe.
offset
Offset, in seconds, from keyframe specified by pKeyframe.
The constructed keyframe will represent a moment in time within a storyboard when the specified transition ends.
Returns a pointer to a keyframe this keyframe depends on.
CBaseKeyFrame* GetExistingKeyframe();
A valid pointer to keyframe, or NULL if this keyframe does not depend on other keyframe.
This is an accessor to a keyframe this keyframe depends on.
Returns an offset from other keyframe.
UI_ANIMATION_SECONDS GetOffset();
An offset in seconds from other keyframe.
This method should be called to determine an offset in seconds from other keyframe.
Returns a pointer to a transition this keyframe depends on.
CBaseTransition* GetTransition();
A valid pointer to transition, or NULL if this keyframe does not depend on transition.
This is an accessor to a transition this keyframe depends on.
Specifies offset of this keyframe from a keyframe stored in m_pExistingKeyFrame.
UI_ANIMATION_SECONDS m_offset;
Stores a pointer to an existing keframe. This keyframe is added to storyboard with m_offset to the existing keyframe.
CBaseKeyFrame* m_pExistingKeyFrame;
Stores a pointer to transtion that begins at this keyframe.
CBaseTransition* m_pTransition;