The AnimationBase class defines the basic animation properties, such as the interpolator to be used, the duration of the animation in milliseconds, the delay before the animation is started in milliseconds, and the repeat count.
Public Member Functions | |
result | GetBezierControlPoints (float &time1, float &value1, float &time2, float &value2) const |
long | GetDelay (void) const |
long | GetDuration (void) const |
AnimationInterpolatorType | GetInterpolatorType (void) const |
int | GetKeyFrameCount (void) const |
Osp::Base::String | GetName (void) const |
long | GetOffset (void) const |
long | GetRepeatCount (void) const |
float | GetScaleRatio (void) const |
virtual AnimationType | GetType (void) const =0 |
bool | IsAutoReverseEnabled (void) const |
bool | IsHoldEndEnabled (void) const |
void | SetAutoReverseEnabled (bool autoReverse) |
result | SetBezierControlPoints (float time1, float value1, float time2, float value2) |
result | SetDelay (long milliseconds) |
result | SetDuration (long milliseconds) |
void | SetHoldEndEnabled (bool holdEnd) |
void | SetInterpolatorType (AnimationInterpolatorType interpolatorType) |
void | SetName (const Osp::Base::String &name) |
result | SetOffset (long milliseconds) |
result | SetRepeatCount (long count) |
result | SetScaleRatio (float scaleRatio) |
virtual | ~AnimationBase (void) |
virtual Osp::Ui::Animations::AnimationBase::~AnimationBase | ( | void | ) | [virtual] |
This is the destructor for this class.
result Osp::Ui::Animations::AnimationBase::GetBezierControlPoints | ( | float & | time1, |
float & | value1, | ||
float & | time2, | ||
float & | value2 | ||
) | const |
Gets the control points of the Bezier interpolator.
This method is supported only if the interpolator is ANIMATION_INTERPOLATOR_BEZIER. 0
is returned for the other interpolators.
[out] | time1 | The control point 1 - Time The default value of control point 1 is 0.0 . |
[out] | value1 | The control point 1 - Value The default value of control point 1 is 0.0 . |
[out] | time2 | The control point 2 - Time The default value of control point 2 is 0.0 . |
[out] | value2 | The control point 2 - Value The default value of control point 2 is 0.0 . |
E_SUCCESS | The method is successful. |
E_INVALID_STATE | This instance has not been properly constructed as yet. |
E_INVALID_OPERATION | This method is not supported for the interpolator set of this instance. |
long Osp::Ui::Animations::AnimationBase::GetDelay | ( | void | ) | const |
Gets the delay value in milliseconds before the animation starts.
0
. long Osp::Ui::Animations::AnimationBase::GetDuration | ( | void | ) | const |
Gets the duration of the animation in milliseconds.
AnimationInterpolatorType Osp::Ui::Animations::AnimationBase::GetInterpolatorType | ( | void | ) | const |
Gets the interpolator type.
ANIMATION_INTERPOLATOR_LINEAR
. int Osp::Ui::Animations::AnimationBase::GetKeyFrameCount | ( | void | ) | const |
Gets the count of key frames added to this animation.
Osp::Base::String Osp::Ui::Animations::AnimationBase::GetName | ( | void | ) | const |
Gets the name of the animation.
long Osp::Ui::Animations::AnimationBase::GetOffset | ( | void | ) | const |
Gets the offset value in milliseconds after the animation starts.
0
. long Osp::Ui::Animations::AnimationBase::GetRepeatCount | ( | void | ) | const |
Gets the repeat count value of the animation.
1
. float Osp::Ui::Animations::AnimationBase::GetScaleRatio | ( | void | ) | const |
Gets the scale ratio value of the animation.
1.0f
virtual AnimationType Osp::Ui::Animations::AnimationBase::GetType | ( | void | ) | const [pure virtual] |
Gets the type information of this instance.
Implemented in Osp::Ui::Animations::DimensionAnimation, Osp::Ui::Animations::FloatAnimation, Osp::Ui::Animations::IntegerAnimation, Osp::Ui::Animations::PointAnimation, Osp::Ui::Animations::RectangleAnimation, and Osp::Ui::Animations::RotateAnimation.
bool Osp::Ui::Animations::AnimationBase::IsAutoReverseEnabled | ( | void | ) | const |
Checks whether the auto reverse is enabled.
true
if the auto reverse is enabled, false
false
. bool Osp::Ui::Animations::AnimationBase::IsHoldEndEnabled | ( | void | ) | const |
Checks whether the hold end value of the animation is enabled.
true
if the hold end value is enabled, false
true
. void Osp::Ui::Animations::AnimationBase::SetAutoReverseEnabled | ( | bool | autoReverse | ) |
Sets the AutoReverse property of the animation.
If enabled, the forward and backward animation can also be played.
[in] | autoReverse | Set to true to enable the AutoReverse property of the animation, else false |
autoReverseset
is set to true
, the duration of the animation is doubled. If the repeat count is more than 1, autoReverse
is applied to each iteration. Note that if autoReverse
is set to true
, one forward animation play and one backward animation play is one iteration. result Osp::Ui::Animations::AnimationBase::SetBezierControlPoints | ( | float | time1, |
float | value1, | ||
float | time2, | ||
float | value2 | ||
) |
Sets the control points for Bezier interpolator.
This method is supported only if the interpolator is ANIMATION_INTERPOLATOR_BEZIER.
[in] | time1 | The control point 1 - Time The time should be in the range 0.0 to 1.0 . The time value is scaled relative to the duration of the animation. |
[in] | value1 | The control point 1 - Value The value should be in the range 0.0 to 1.0 . The value is scaled relative to the start and end value of the animation. |
[in] | time2 | The control point 2 - Time The time should be in the range 0.0 to 1.0 . The time value is scaled relative to the duration of the animation. |
[in] | value2 | The control point 2 - Value The time should be in the range 0.0 to 1.0 . The value is scaled relative to the start and end value of the animation. |
E_SUCCESS | The method is successful. |
E_INVALID_STATE | This instance has not been properly constructed as yet. |
E_INVALID_OPERATION | This method is not supported for the interpolator set of this instance. |
E_INVALID_ARG | A specified input parameter is invalid. |
time1
can be greater than time2
and vice versa. result Osp::Ui::Animations::AnimationBase::SetDelay | ( | long | milliseconds | ) |
Sets the delay for the animation.
The animation starts after the duration of delay has passed.
[in] | milliseconds | The delay for the animation to start in milliseconds |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The value of the specified parameter is negative. |
E_INVALID_STATE | This instance has not been properly constructed. |
result Osp::Ui::Animations::AnimationBase::SetDuration | ( | long | milliseconds | ) |
Sets the duration of the animation.
[in] | milliseconds | The duration of the animation in milliseconds |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The value of the specified parameter is negative. |
E_INVALID_STATE | This instance has not been properly constructed. |
void Osp::Ui::Animations::AnimationBase::SetHoldEndEnabled | ( | bool | holdEnd | ) |
Sets the hold end value of the animation.
This method retains the end values of an animation or goes to the start value of an animation.
[in] | holdEnd | Set to true to hold the end values of the animation, else false |
void Osp::Ui::Animations::AnimationBase::SetInterpolatorType | ( | AnimationInterpolatorType | interpolatorType | ) |
Sets the interpolator type.
[in] | interpolatorType | The interpolator type used for the animation |
void Osp::Ui::Animations::AnimationBase::SetName | ( | const Osp::Base::String & | name | ) |
Sets the name of the animation.
[in] | name | The name of the animation |
result Osp::Ui::Animations::AnimationBase::SetOffset | ( | long | milliseconds | ) |
Sets the offset value of the animation.
Additionally, this method alters the start value and duration for which an animation is played.
[in] | milliseconds | The offset of the animation in milliseconds |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The value of the specified parameter is negative or greater than the duration of the animation. |
E_INVALID_STATE | This instance has not been properly constructed. |
autoReverseset
is set to true
, the Backward animation plays for 100ms, from 1.0 to 0.0. result Osp::Ui::Animations::AnimationBase::SetRepeatCount | ( | long | count | ) |
Sets the repeat count for the animation.
Repeats an animation for the specified number of times.
[in] | count | The number of times the animation has to be repeated |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The value of the specified parameter is negative. |
E_INVALID_STATE | This instance has not been properly constructed. |
result Osp::Ui::Animations::AnimationBase::SetScaleRatio | ( | float | scaleRatio | ) |
Sets the scale ratio of the animation.
This method multiplies the duration, offset, and delay using the scale ratio.
[in] | scaleRatio | The scale ratio property of the animation |
E_SUCCESS | The method is successful. |
E_INVALID_ARG | The value of the specified parameter is negative. |
E_INVALID_STATE | This instance has not been properly constructed. |