2 * Copyright (c) 2022 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>
32 namespace // unnamed namespace
35 Dali::BaseHandle Create()
37 return Dali::BaseHandle();
40 Dali::TypeRegistration type(typeid(Dali::VectorAnimationRenderer), typeid(Dali::BaseHandle), Create);
42 } // unnamed namespace
44 VectorAnimationRendererPtr VectorAnimationRenderer::New()
46 VectorAnimationRendererPtr renderer = new VectorAnimationRenderer();
50 VectorAnimationRenderer::VectorAnimationRenderer()
51 : mPlugin(std::string())
55 VectorAnimationRenderer::~VectorAnimationRenderer()
59 void VectorAnimationRenderer::Finalize()
64 bool VectorAnimationRenderer::Load(const std::string& url)
66 return mPlugin.Load(url);
69 void VectorAnimationRenderer::SetRenderer(Dali::Renderer renderer)
71 mPlugin.SetRenderer(renderer);
74 void VectorAnimationRenderer::SetSize(uint32_t width, uint32_t height)
76 mPlugin.SetSize(width, height);
79 bool VectorAnimationRenderer::Render(uint32_t frameNumber)
81 return mPlugin.Render(frameNumber);
84 uint32_t VectorAnimationRenderer::GetTotalFrameNumber() const
86 return mPlugin.GetTotalFrameNumber();
89 float VectorAnimationRenderer::GetFrameRate() const
91 return mPlugin.GetFrameRate();
94 void VectorAnimationRenderer::GetDefaultSize(uint32_t& width, uint32_t& height) const
96 mPlugin.GetDefaultSize(width, height);
99 void VectorAnimationRenderer::GetLayerInfo(Property::Map& map) const
101 mPlugin.GetLayerInfo(map);
104 bool VectorAnimationRenderer::GetMarkerInfo(const std::string& marker, uint32_t& startFrame, uint32_t& endFrame) const
106 return mPlugin.GetMarkerInfo(marker, startFrame, endFrame);
109 void VectorAnimationRenderer::InvalidateBuffer()
111 mPlugin.InvalidateBuffer();
114 void VectorAnimationRenderer::AddPropertyValueCallback(const std::string& keyPath, Dali::VectorAnimationRenderer::VectorProperty property, CallbackBase* callback, int32_t id)
116 mPlugin.AddPropertyValueCallback(keyPath, property, callback, id);
119 Dali::VectorAnimationRenderer::UploadCompletedSignalType& VectorAnimationRenderer::UploadCompletedSignal()
121 return mPlugin.UploadCompletedSignal();
124 } // namespace Adaptor
126 } // namespace Internal