1#ifndef __SANIMATIONSET__H__
2#define __SANIMATIONSET__H__
4#include <animation/SAnimation.h>
36 PROPERTY_FILL_AFTER_MASK = 0x1,
37 PROPERTY_FILL_BEFORE_MASK = 0x2,
38 PROPERTY_DURATION_MASK = 0x04,
39 PROPERTY_SHARE_INTERPOLATOR_MASK = 0x08,
46 SArray<SAutoRefPtr<IAnimation>> mAnimations;
77 void setFlag(
int mask,
bool value);
89 STDMETHOD_(
void,
setFillAfter)(THIS_ BOOL bFill) OVERRIDE;
101 STDMETHOD_(
void,
setDuration)(THIS_
long durationMillis) OVERRIDE;
108 STDMETHOD_(
long,
getDuration)(THIS) SCONST OVERRIDE;
118 (THIS_ uint64_t currentTime, ITransformation *outTransformation) OVERRIDE;
135 (THIS_
int width,
int height,
int parentWidth,
int parentHeight,
int nScale) OVERRIDE;
141 STDMETHOD_(
void,
copy)(THIS_
const IAnimation *src) OVERRIDE;
146 STDMETHOD_(
void,
pause)(THIS) OVERRIDE;
151 STDMETHOD_(
void,
resume)(THIS) OVERRIDE;
197 ATTR_BIT(L
"shareInterpolator", mFlags, PROPERTY_SHARE_INTERPOLATOR_MASK, FALSE)
BOOL hasAlpha() SCONST OVERRIDE
Checks whether the animation affects the alpha property.
SAnimation()
Default constructor for SAnimation.
void setFillBefore(BOOL bFill) OVERRIDE
Sets whether the animation transformation should be applied before the animation starts.
long getDuration() SCONST OVERRIDE
Gets the duration of the AnimationSet. The duration of an AnimationSet is defined to be the duration ...
void setFillAfter(BOOL bFill) OVERRIDE
Sets whether the animation transformation should be applied after the animation ends.
void pause() OVERRIDE
Pauses the animation.
HRESULT OnAttrDuration(const SStringW &value, BOOL bLoading)
Custom attribute handler for duration.
void addAnimation(IAnimation *a)
Add a child animation to this animation set. The transforms of the child animations are applied in th...
void initialize(int width, int height, int parentWidth, int parentHeight, int nScale) OVERRIDE
Initializes the animation with the dimensions of the object and its parent.
void resume() OVERRIDE
Resumes the animation.
SAnimationSet(bool shareInterpolator=true)
Constructor to use when building an AnimationSet from code.
HRESULT OnAttrFillBefore(const SStringW &value, BOOL bLoading)
Custom attribute handler for fillBefore.
void setDuration(long durationMillis) OVERRIDE
Sets the duration of every child animation.
void scaleCurrentDuration(float scale) OVERRIDE
Scales the current duration of the animation.
BOOL getTransformation(uint64_t currentTime, ITransformation *outTransformation) OVERRIDE
Gets the transformation at a specific time. The transformation of an animation set is the concatenati...
HRESULT OnAttrFillAfter(const SStringW &value, BOOL bLoading)
Custom attribute handler for fillAfter.
HRESULT OnAttrStartOffset(const SStringW &value, BOOL bLoading)
Custom attribute handler for startOffset.
void copy(const IAnimation *src) OVERRIDE
Copies the properties of another animation to this animation.
BOOL InitFromXml(IXmlNode *pNode) OVERRIDE
Initializes the animation set from an XML node.
A class representing an ASCII string.