2 * Copyright (c) 2019 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/internal/vector-animation/common/vector-animation-renderer-impl.h>
22 #include <dali/public-api/object/type-registry.h>
35 namespace // unnamed namespace
39 Dali::BaseHandle Create()
41 return Dali::BaseHandle();
44 Dali::TypeRegistration type( typeid( Dali::VectorAnimationRenderer ), typeid( Dali::BaseHandle ), Create );
46 } // unnamed namespace
48 VectorAnimationRendererPtr VectorAnimationRenderer::New()
50 VectorAnimationRendererPtr renderer = new VectorAnimationRenderer();
54 VectorAnimationRenderer::VectorAnimationRenderer()
55 : mPlugin( std::string() )
59 VectorAnimationRenderer::~VectorAnimationRenderer()
63 void VectorAnimationRenderer::Initialize( const std::string& url )
65 mPlugin.Initialize( url );
68 void VectorAnimationRenderer::SetRenderer( Dali::Renderer renderer )
70 mPlugin.SetRenderer( renderer );
73 void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
75 mPlugin.SetSize( width, height );
78 bool VectorAnimationRenderer::Render( uint32_t frameNumber )
80 return mPlugin.Render( frameNumber );
83 uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
85 return mPlugin.GetTotalFrameNumber();
88 float VectorAnimationRenderer::GetFrameRate() const
90 return mPlugin.GetFrameRate();
93 void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height ) const
95 mPlugin.GetDefaultSize( width, height );
98 Dali::VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
100 return mPlugin.UploadCompletedSignal();
103 } // namespace Adaptor
105 } // namespace internal