1 #ifndef __DALI_ALPHA_FUNCTIONS_H__
2 #define __DALI_ALPHA_FUNCTIONS_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali/public-api/common/dali-common.h>
24 namespace Dali DALI_IMPORT_API
27 typedef float (*AlphaFunction)(float progress); ///< Definition of an alpha function
30 * @brief Namespace containing a set of alpha functions.
32 namespace AlphaFunctions
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
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
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
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
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
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
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
68 float Sin(float progress); ///< Single revolution
69 float Sin2x(float progress); ///< Two revolutions
71 } // namespace AlphaFunctions
75 #endif // __DALI_ALPHA_FUNCTIONS_H__