Merge branch 'devel/master' into sandbox/dkdk/tizen
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / vector-animation-renderer.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
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
18 // CLASS HEADER
19 #include <dali/devel-api/adaptor-framework/vector-animation-renderer.h>
20
21 // INTERNAL INCLUDES
22 #include <dali/internal/vector-animation/common/vector-animation-renderer-impl.h>
23
24 namespace Dali
25 {
26 VectorAnimationRenderer VectorAnimationRenderer::New(const std::string& url)
27 {
28   Internal::Adaptor::VectorAnimationRendererPtr animationRenderer = Internal::Adaptor::VectorAnimationRenderer::New();
29   if(animationRenderer)
30   {
31     animationRenderer->Initialize(url);
32   }
33
34   return VectorAnimationRenderer(animationRenderer.Get());
35 }
36
37 VectorAnimationRenderer::VectorAnimationRenderer()
38 {
39 }
40
41 VectorAnimationRenderer::~VectorAnimationRenderer()
42 {
43 }
44
45 VectorAnimationRenderer::VectorAnimationRenderer(Internal::Adaptor::VectorAnimationRenderer* internal)
46 : BaseHandle(internal)
47 {
48 }
49
50 VectorAnimationRenderer::VectorAnimationRenderer(const VectorAnimationRenderer& handle)
51 : BaseHandle(handle)
52 {
53 }
54
55 VectorAnimationRenderer& VectorAnimationRenderer::operator=(const VectorAnimationRenderer& rhs)
56 {
57   BaseHandle::operator=(rhs);
58   return *this;
59 }
60
61 void VectorAnimationRenderer::Finalize()
62 {
63   GetImplementation(*this).Finalize();
64 }
65
66 void VectorAnimationRenderer::SetRenderer(Renderer renderer)
67 {
68   GetImplementation(*this).SetRenderer(renderer);
69 }
70
71 void VectorAnimationRenderer::SetSize(uint32_t width, uint32_t height)
72 {
73   GetImplementation(*this).SetSize(width, height);
74 }
75
76 bool VectorAnimationRenderer::Render(uint32_t frameNumber)
77 {
78   return GetImplementation(*this).Render(frameNumber);
79 }
80
81 uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
82 {
83   return GetImplementation(*this).GetTotalFrameNumber();
84 }
85
86 float VectorAnimationRenderer::GetFrameRate() const
87 {
88   return GetImplementation(*this).GetFrameRate();
89 }
90
91 void VectorAnimationRenderer::GetDefaultSize(uint32_t& width, uint32_t& height) const
92 {
93   GetImplementation(*this).GetDefaultSize(width, height);
94 }
95
96 void VectorAnimationRenderer::GetLayerInfo(Property::Map& map) const
97 {
98   GetImplementation(*this).GetLayerInfo(map);
99 }
100
101 bool VectorAnimationRenderer::GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const
102 {
103   return GetImplementation(*this).GetMarkerInfo(marker, startFrame, endFrame);
104 }
105
106 void VectorAnimationRenderer::IgnoreRenderedFrame()
107 {
108   GetImplementation(*this).IgnoreRenderedFrame();
109 }
110
111 VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
112 {
113   return GetImplementation(*this).UploadCompletedSignal();
114 }
115
116 } // namespace Dali