Merge "Change shader data pointer to IntrusivePtr" into tizen
[platform/core/uifw/dali-core.git] / dali / public-api / animation / alpha-functions.h
1 #ifndef __DALI_ALPHA_FUNCTIONS_H__
2 #define __DALI_ALPHA_FUNCTIONS_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // INTERNAL INCLUDES
22 #include <dali/public-api/common/dali-common.h>
23
24 namespace Dali DALI_IMPORT_API
25 {
26
27 typedef float (*AlphaFunction)(float progress); ///< Definition of an alpha function
28
29 /**
30  * @brief Namespace containing a set of alpha functions.
31  */
32 namespace AlphaFunctions
33 {
34
35 float Default(float progres);     ///< Linear
36 float Linear(float progress);     ///< Linear
37 float Square(float progress);     ///< Square (x^2)
38 float Reverse(float progress);    ///< Reverse linear
39
40 float EaseIn(float progress);     ///< Speeds up and comes to a sudden stop
41 float EaseOut(float progress);    ///< Sudden start and slows to a gradual stop
42 float EaseInOut(float progress);  ///< Speeds up and slows to a gradual stop
43
44 float EaseInSine(float progress);    ///< Speeds up and comes to a sudden stop
45 float EaseOutSine(float progress);   ///< Sudden start and slows to a gradual stop
46 float EaseInOutSine(float progress); ///< Speeds up and slows to a gradual stop
47
48 float EaseInSine33(float progress);          ///< Speeds up and comes to a sudden stop
49 float EaseOutSine33(float progress);         ///< Sudden start and slows to a gradual stop
50 float EaseInOutSine33(float progress);       ///< Speeds up and slows to a gradual stop
51 float EaseInOutSine50(float progress);       ///< Speeds up and slows to a gradual stop
52 float EaseInOutSine60(float progress);       ///< Speeds up and slows to a gradual stop
53 float EaseInOutSine70(float progress);       ///< Speeds up and slows to a gradual stop
54 float EaseInOutSine80(float progress);       ///< Speeds up and slows to a gradual stop
55 float EaseInOutSine90(float progress);       ///< Speeds up and slows to a gradual stop
56 float DoubleEaseInOutSine60(float progress); ///< Speeds up and slows to a gradual stop, then speeds up again and slows to a gradual stop
57
58 float EaseOutQuint50(float progress);        ///< Sudden start and slows to a gradual stop
59 float EaseOutQuint80(float progress);        ///< Sudden start and slows to a gradual stop
60
61 float Bounce(float progress);     ///< Sudden start, loses momentum and returns to start position
62 float BounceBack(float progress); ///< Sudden start, loses momentum and returns to exceed start position and gradual stop at start position
63
64 float EaseInBack(float progress);    ///< Slow start, exceed start position and quickly reach destination
65 float EaseOutBack(float progress);   ///< Sudden start, exceed end position and return to a gradual stop
66 float EaseInOutBack(float progress); ///< Slow start, exceed start position, fast middle, exceed end position and return to a gradual stop
67
68 float Sin(float progress);        ///< Single revolution
69 float Sin2x(float progress);      ///< Two revolutions
70
71 } // namespace AlphaFunctions
72
73 } // namespace Dali
74
75 #endif // __DALI_ALPHA_FUNCTIONS_H__