2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include <dali/public-api/animation/key-frames.h>
22 #include <dali/internal/event/animation/key-frames-impl.h>
23 #include <dali/public-api/animation/alpha-function.h>
24 #include <dali/public-api/math/degree.h>
25 #include <dali/public-api/math/radian.h>
29 KeyFrames KeyFrames::New()
31 Internal::KeyFrames* internal = Internal::KeyFrames::New();
32 return KeyFrames(internal);
35 KeyFrames KeyFrames::DownCast(BaseHandle handle)
37 return KeyFrames(dynamic_cast<Dali::Internal::KeyFrames*>(handle.GetObjectPtr()));
40 KeyFrames::KeyFrames() = default;
42 KeyFrames::~KeyFrames() = default;
44 KeyFrames::KeyFrames(const KeyFrames& handle) = default;
46 KeyFrames& KeyFrames::operator=(const KeyFrames& rhs) = default;
48 KeyFrames::KeyFrames(KeyFrames&& rhs) = default;
50 KeyFrames& KeyFrames::operator=(KeyFrames&& rhs) = default;
52 Property::Type KeyFrames::GetType() const
54 return GetImplementation(*this).GetType();
57 void KeyFrames::Add(float time, Property::Value value)
59 Add(time, std::move(value), AlphaFunction::DEFAULT);
62 void KeyFrames::Add(float time, Property::Value value, AlphaFunction alpha)
64 GetImplementation(*this).Add(time, value, alpha);
67 KeyFrames::KeyFrames(Internal::KeyFrames* internal)
68 : BaseHandle(internal)