Tizen Native API
Dali::AlphaFunction Class Reference

Alpha functions are used in animations to specify the rate of change of the animation parameter over time. More...

Public Types

enum  BuiltinFunction
 Built-in alpha functions. More...
enum  Mode
 All possible functioning modes for the alpha function. More...

Public Member Functions

 AlphaFunction ()
 Default constructor. Creates an alpha function object with the default built-in alpha function.
 AlphaFunction (BuiltinFunction function)
 Constructor. Creates an alpha function object with the built-in alpha function passed as a parameter to the constructor.
 AlphaFunction (AlphaFunctionPrototype function)
 Constructor. Creates an alpha function object using a pointer to an alpha function passed as a paramter to the constructor.
 AlphaFunction (const Dali::Vector2 &controlPoint0, const Dali::Vector2 &controlPoint1)
 Constructor.
Vector4 GetBezierControlPoints () const
 Return the control points of the alpha function.
AlphaFunctionPrototype GetCustomFunction () const
 Returns the pointer to the custom function.
BuiltinFunction GetBuiltinFunction () const
 Returns the built-in function used by the alpha function.
Mode GetMode () const
 Returns the functioning mode of the alpha function.

Detailed Description

Alpha functions are used in animations to specify the rate of change of the animation parameter over time.

Understanding an animation as a parametric function over time, the alpha function is applied to the parameter of the animation before computing the final animation value.

Since :
2.4

Member Enumeration Documentation

Built-in alpha functions.

Since :
2.4
Enumerator:
DEFAULT 

Linear.

Since :
2.4
LINEAR 

No transformation.

Since :
2.4
REVERSE 

Reverse linear.

Since :
2.4
EASE_IN_SQUARE 

Speeds up and comes to a sudden stop (Square)

Since :
2.4
EASE_OUT_SQUARE 

Sudden start and slows to a gradual stop (Square)

Since :
2.4
EASE_IN 

Speeds up and comes to a sudden stop (Cubic)

Since :
2.4
EASE_OUT 

Sudden start and slows to a gradual stop (Cubic)

Since :
2.4
EASE_IN_OUT 

Speeds up and slows to a gradual stop (Cubic)

Since :
2.4
EASE_IN_SINE 

Speeds up and comes to a sudden stop (sinusoidal)

Since :
2.4
EASE_OUT_SINE 

Sudden start and slows to a gradual stop (sinusoidal)

Since :
2.4
EASE_IN_OUT_SINE 

Speeds up and slows to a gradual stop (sinusoidal)

Since :
2.4
BOUNCE 

Sudden start, loses momentum and returns to start position.

Since :
2.4
SIN 

Single revolution.

Since :
2.4
EASE_OUT_BACK 

Sudden start, exceed end position and return to a gradual stop.

Since :
2.4

All possible functioning modes for the alpha function.

Since :
2.4
Enumerator:
BUILTIN_FUNCTION 

The user has specified a built-in function.

Since :
2.4
CUSTOM_FUNCTION 

The user has provided a custom function.

Since :
2.4
BEZIER 

The user has provided the control points of a bezier curve.

Since :
2.4

Constructor & Destructor Documentation

Default constructor. Creates an alpha function object with the default built-in alpha function.

Since :
2.4
Returns:
The alpha function

Constructor. Creates an alpha function object with the built-in alpha function passed as a parameter to the constructor.

Since :
2.4
Parameters:
[in]functionOne of the built-in alpha functions
Returns:
The alpha function

Constructor. Creates an alpha function object using a pointer to an alpha function passed as a paramter to the constructor.

Since :
2.4
Parameters:
[in]functionA pointer to an alpha function
Returns:
The alpha function
Dali::AlphaFunction::AlphaFunction ( const Dali::Vector2 controlPoint0,
const Dali::Vector2 controlPoint1 
)

Constructor.

Creates a bezier alpha function. The bezier will have the first point at (0,0) and the end point at (1,1).

Since :
2.4
Parameters:
[in]controlPoint0A Vector2 which will be used as the first control point of the curve
[in]controlPoint1A Vector2 which will be used as the second control point of the curve
Returns:
The alpha function
Note:
The x components of the control points will be clamped to the range [0,1] to prevent non monotonic curves.

Member Function Documentation

Return the control points of the alpha function.

Since :
2.4
Returns:
Vector4 containing the two control points of the curve. (xy for the first point and zw for the second)

Returns the built-in function used by the alpha function.

Since :
2.4
Returns:
One of the built-in alpha functions. In case no built-in function has been specified, it will return AlphaFunction::DEFAULT

Returns the pointer to the custom function.

Since :
2.4
Returns:
A pointer to a custom alpha function or 0 if not defined

Returns the functioning mode of the alpha function.

Since :
2.4
Returns:
The functioning mode of the alpha function