1 #ifndef DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_IMPL_H
2 #define DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_IMPL_H
5 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 #include <dali/public-api/object/base-object.h>
25 #include <dali/devel-api/adaptor-framework/vector-animation-renderer.h>
26 #include <dali/internal/vector-animation/common/vector-animation-renderer-plugin-proxy.h>
37 class VectorAnimationRenderer;
38 using VectorAnimationRendererPtr = IntrusivePtr< VectorAnimationRenderer >;
41 * Dali internal VectorAnimationRenderer.
43 class VectorAnimationRenderer : public BaseObject, public ConnectionTracker
48 * @brief Creates a VectorAnimationRenderer object.
50 * @param[in] url The url of the vector animation file
52 static VectorAnimationRendererPtr New();
55 * @brief Initializes member data.
57 void Initialize( const std::string& url );
60 * @copydoc Dali::VectorAnimationRenderer::SetRenderer()
62 void SetRenderer( Dali::Renderer renderer );
65 * @copydoc Dali::VectorAnimationRenderer::SetSize()
67 void SetSize( uint32_t width, uint32_t height );
70 * @copydoc Dali::VectorAnimationRenderer::Render()
72 bool Render( uint32_t frameNumber );
75 * @copydoc Dali::VectorAnimationRenderer::GetTotalFrameNumber()
77 uint32_t GetTotalFrameNumber() const;
80 * @copydoc Dali::VectorAnimationRenderer::GetFrameRate()
82 float GetFrameRate() const;
85 * @copydoc Dali::VectorAnimationRenderer::GetDefaultSize()
87 void GetDefaultSize( uint32_t& width, uint32_t& height ) const;
90 * @copydoc Dali::VectorAnimationRenderer::GetLayerInfo()
92 void GetLayerInfo( Property::Map& map ) const;
95 * @copydoc Dali::VectorAnimationRenderer::UploadCompletedSignal()
97 Dali::VectorAnimationRenderer::UploadCompletedSignalType& UploadCompletedSignal();
104 VectorAnimationRenderer();
109 ~VectorAnimationRenderer();
113 VectorAnimationRenderer( const VectorAnimationRenderer& ) = delete;
114 VectorAnimationRenderer& operator=( VectorAnimationRenderer& ) = delete;
118 VectorAnimationRendererPluginProxy mPlugin;
121 } // namespace Adaptor
123 } // namespace Internal
125 inline static Internal::Adaptor::VectorAnimationRenderer& GetImplementation( Dali::VectorAnimationRenderer& renderer )
127 DALI_ASSERT_ALWAYS( renderer && "VectorAnimationRenderer handle is empty." );
129 BaseObject& handle = renderer.GetBaseObject();
131 return static_cast< Internal::Adaptor::VectorAnimationRenderer& >( handle );
134 inline static const Internal::Adaptor::VectorAnimationRenderer& GetImplementation( const Dali::VectorAnimationRenderer& renderer )
136 DALI_ASSERT_ALWAYS( renderer && "VectorAnimationRenderer handle is empty." );
138 const BaseObject& handle = renderer.GetBaseObject();
140 return static_cast< const Internal::Adaptor::VectorAnimationRenderer& >( handle );
145 #endif // DALI_INTERNAL_VECTOR_ANIMATION_RENDERER_IMPL_H