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::Finalize()
73 void VectorAnimationRenderer::SetRenderer( Dali::Renderer renderer )
75 mPlugin.SetRenderer( renderer );
78 void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
80 mPlugin.SetSize( width, height );
83 bool VectorAnimationRenderer::Render( uint32_t frameNumber )
85 return mPlugin.Render( frameNumber );
88 uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
90 return mPlugin.GetTotalFrameNumber();
93 float VectorAnimationRenderer::GetFrameRate() const
95 return mPlugin.GetFrameRate();
98 void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height ) const
100 mPlugin.GetDefaultSize( width, height );
103 void VectorAnimationRenderer::GetLayerInfo( Property::Map& map ) const
105 mPlugin.GetLayerInfo( map );
108 bool VectorAnimationRenderer::GetMarkerInfo( const std::string& marker, uint32_t& startFrame, uint32_t& endFrame ) const
110 return mPlugin.GetMarkerInfo( marker, startFrame, endFrame );
113 Dali::VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
115 return mPlugin.UploadCompletedSignal();
118 } // namespace Adaptor
120 } // namespace internal