2 * Copyright (c) 2018 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 <vector-animation-renderer.h>
22 #include <vector-animation-renderer-impl.h>
27 VectorAnimationRenderer VectorAnimationRenderer::New( const std::string& url, Renderer renderer, uint32_t width, uint32_t height )
29 Internal::Adaptor::VectorAnimationRendererPtr animationRenderer = Internal::Adaptor::VectorAnimationRenderer::New();
30 if( animationRenderer )
32 animationRenderer->Initialize( url, renderer, width, height );
35 return VectorAnimationRenderer( animationRenderer.Get() );
38 VectorAnimationRenderer::VectorAnimationRenderer()
42 VectorAnimationRenderer::~VectorAnimationRenderer()
46 VectorAnimationRenderer::VectorAnimationRenderer( Internal::Adaptor::VectorAnimationRenderer* internal )
47 : BaseHandle( internal )
51 VectorAnimationRenderer::VectorAnimationRenderer( const VectorAnimationRenderer& handle )
52 : BaseHandle( handle )
56 VectorAnimationRenderer& VectorAnimationRenderer::operator=( const VectorAnimationRenderer& rhs )
58 BaseHandle::operator=( rhs );
62 void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
64 GetImplementation( *this ).SetSize( width, height );
67 bool VectorAnimationRenderer::StartRender()
69 return GetImplementation( *this ).StartRender();
72 void VectorAnimationRenderer::StopRender()
74 GetImplementation( *this ).StopRender();
77 void VectorAnimationRenderer::Render( uint32_t frameNumber )
79 GetImplementation( *this ).Render( frameNumber );
82 uint32_t VectorAnimationRenderer::GetTotalFrameNumber()
84 return GetImplementation( *this ).GetTotalFrameNumber();