[SRUK] Initial copy from Tizen 2.2 version
[platform/core/uifw/dali-core.git] / dali / public-api / animation / key-frames.cpp
1 //
2 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 // CLASS HEADER
18 #include <dali/public-api/animation/key-frames.h>
19
20 // INTERNAL INCLUDES
21 #include <dali/public-api/animation/alpha-functions.h>
22 #include <dali/public-api/math/degree.h>
23 #include <dali/public-api/math/radian.h>
24 #include <dali/internal/event/animation/key-frames-impl.h>
25
26 namespace Dali
27 {
28
29 KeyFrames KeyFrames::New()
30 {
31   Internal::KeyFrames* internal = Internal::KeyFrames::New();
32   return KeyFrames(internal);
33 }
34
35 KeyFrames KeyFrames::DownCast( BaseHandle handle )
36 {
37   return KeyFrames( dynamic_cast<Dali::Internal::KeyFrames*>(handle.GetObjectPtr()) );
38 }
39
40 KeyFrames::KeyFrames()
41 {
42 }
43
44 KeyFrames::~KeyFrames()
45 {
46 }
47
48 Property::Type KeyFrames::GetType() const
49 {
50   return GetImplementation(*this).GetType();
51 }
52
53 void KeyFrames::Add(float time, Property::Value value)
54 {
55   Add(time, value, AlphaFunctions::Linear);
56 }
57
58 void KeyFrames::Add(float time, Property::Value value, AlphaFunction alpha)
59 {
60   GetImplementation(*this).Add(time, value, alpha);
61 }
62
63 KeyFrames::KeyFrames(Internal::KeyFrames* internal)
64   : BaseHandle(internal)
65 {
66 }
67
68
69
70 } // Dali