(Vector) Change return type of Render()
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / vector-animation-renderer.cpp
1 /*
2  * Copyright (c) 2019 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
27 VectorAnimationRenderer VectorAnimationRenderer::New( const std::string& url )
28 {
29   Internal::Adaptor::VectorAnimationRendererPtr animationRenderer = Internal::Adaptor::VectorAnimationRenderer::New();
30   if( animationRenderer )
31   {
32     animationRenderer->Initialize( url );
33   }
34
35   return VectorAnimationRenderer( animationRenderer.Get() );
36 }
37
38 VectorAnimationRenderer::VectorAnimationRenderer()
39 {
40 }
41
42 VectorAnimationRenderer::~VectorAnimationRenderer()
43 {
44 }
45
46 VectorAnimationRenderer::VectorAnimationRenderer( Internal::Adaptor::VectorAnimationRenderer* internal )
47 : BaseHandle( internal )
48 {
49 }
50
51 VectorAnimationRenderer::VectorAnimationRenderer( const VectorAnimationRenderer& handle )
52 : BaseHandle( handle )
53 {
54 }
55
56 VectorAnimationRenderer& VectorAnimationRenderer::operator=( const VectorAnimationRenderer& rhs )
57 {
58   BaseHandle::operator=( rhs );
59   return *this;
60 }
61
62 void VectorAnimationRenderer::SetRenderer( Renderer renderer )
63 {
64   GetImplementation( *this ).SetRenderer( renderer );
65 }
66
67 void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
68 {
69   GetImplementation( *this ).SetSize( width, height );
70 }
71
72 void VectorAnimationRenderer::StopRender()
73 {
74   GetImplementation( *this ).StopRender();
75 }
76
77 bool VectorAnimationRenderer::Render( uint32_t frameNumber )
78 {
79   return GetImplementation( *this ).Render( frameNumber );
80 }
81
82 uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
83 {
84   return GetImplementation( *this ).GetTotalFrameNumber();
85 }
86
87 float VectorAnimationRenderer::GetFrameRate() const
88 {
89   return GetImplementation( *this ).GetFrameRate();
90 }
91
92 void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height ) const
93 {
94   GetImplementation( *this ).GetDefaultSize( width, height );
95 }
96
97 } // namespace Dali