From 5faf8e4e4162935ffcd180d2db07c82f0d4e39b1 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Mon, 26 Nov 2018 15:09:06 +0900 Subject: [PATCH] [4.0] (VectorAnimationRenderer) Add SetSize method Change-Id: Id654f7157043a6e62e0e407e6c183691db6e694d --- adaptors/common/vector-animation-renderer-impl.cpp | 5 +++++ adaptors/common/vector-animation-renderer-impl.h | 5 +++++ adaptors/common/vector-animation-renderer-plugin-proxy.cpp | 8 ++++++++ adaptors/common/vector-animation-renderer-plugin-proxy.h | 5 +++++ .../adaptor-framework/vector-animation-renderer-plugin.h | 8 ++++++++ .../devel-api/adaptor-framework/vector-animation-renderer.cpp | 5 +++++ adaptors/devel-api/adaptor-framework/vector-animation-renderer.h | 8 ++++++++ 7 files changed, 44 insertions(+) diff --git a/adaptors/common/vector-animation-renderer-impl.cpp b/adaptors/common/vector-animation-renderer-impl.cpp index 9489b30..a4661be 100644 --- a/adaptors/common/vector-animation-renderer-impl.cpp +++ b/adaptors/common/vector-animation-renderer-impl.cpp @@ -65,6 +65,11 @@ void VectorAnimationRenderer::Initialize( const std::string& url, Dali::Renderer mPlugin.CreateRenderer( url, renderer, width, height ); } +void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height ) +{ + mPlugin.SetSize( width, height ); +} + bool VectorAnimationRenderer::StartRender() { return mPlugin.StartRender(); diff --git a/adaptors/common/vector-animation-renderer-impl.h b/adaptors/common/vector-animation-renderer-impl.h index c6a70a3..32243f6 100755 --- a/adaptors/common/vector-animation-renderer-impl.h +++ b/adaptors/common/vector-animation-renderer-impl.h @@ -57,6 +57,11 @@ public: void Initialize( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height ); /** + * @copydoc Dali::VectorAnimationRenderer::SetSize() + */ + void SetSize( uint32_t width, uint32_t height ); + + /** * @copydoc Dali::VectorAnimationRenderer::StartRender() */ bool StartRender(); diff --git a/adaptors/common/vector-animation-renderer-plugin-proxy.cpp b/adaptors/common/vector-animation-renderer-plugin-proxy.cpp index 9aec054..848fb23 100644 --- a/adaptors/common/vector-animation-renderer-plugin-proxy.cpp +++ b/adaptors/common/vector-animation-renderer-plugin-proxy.cpp @@ -109,6 +109,14 @@ bool VectorAnimationRendererPluginProxy::CreateRenderer( const std::string& url, return false; } +void VectorAnimationRendererPluginProxy::SetSize( uint32_t width, uint32_t height ) +{ + if( mPlugin ) + { + mPlugin->SetSize( width, height ); + } +} + bool VectorAnimationRendererPluginProxy::StartRender() { if( mPlugin ) diff --git a/adaptors/common/vector-animation-renderer-plugin-proxy.h b/adaptors/common/vector-animation-renderer-plugin-proxy.h index 08ed236..c0e7dbd 100644 --- a/adaptors/common/vector-animation-renderer-plugin-proxy.h +++ b/adaptors/common/vector-animation-renderer-plugin-proxy.h @@ -53,6 +53,11 @@ public: bool CreateRenderer( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height ); /** + * @copydoc Dali::VectorAnimationRendererPlugin::SetSize() + */ + void SetSize( uint32_t width, uint32_t height ); + + /** * @copydoc Dali::VectorAnimationRendererPlugin::StartRender() */ bool StartRender(); diff --git a/adaptors/devel-api/adaptor-framework/vector-animation-renderer-plugin.h b/adaptors/devel-api/adaptor-framework/vector-animation-renderer-plugin.h index 316d007..bb4ef85 100644 --- a/adaptors/devel-api/adaptor-framework/vector-animation-renderer-plugin.h +++ b/adaptors/devel-api/adaptor-framework/vector-animation-renderer-plugin.h @@ -56,6 +56,14 @@ public: virtual bool CreateRenderer( const std::string& url, Renderer renderer, uint32_t width, uint32_t height ) = 0; /** + * @brief Sets the target image size. + * + * @param[in] width The target image width + * @param[in] height The target image height + */ + virtual void SetSize( uint32_t width, uint32_t height ) = 0; + + /** * @brief Starts the rendering. * * @return True if the renderer is successfully started, false otherwise diff --git a/adaptors/devel-api/adaptor-framework/vector-animation-renderer.cpp b/adaptors/devel-api/adaptor-framework/vector-animation-renderer.cpp index 0f6282c..acec34b 100755 --- a/adaptors/devel-api/adaptor-framework/vector-animation-renderer.cpp +++ b/adaptors/devel-api/adaptor-framework/vector-animation-renderer.cpp @@ -59,6 +59,11 @@ VectorAnimationRenderer& VectorAnimationRenderer::operator=( const VectorAnimati return *this; } +void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height ) +{ + GetImplementation( *this ).SetSize( width, height ); +} + bool VectorAnimationRenderer::StartRender() { return GetImplementation( *this ).StartRender(); diff --git a/adaptors/devel-api/adaptor-framework/vector-animation-renderer.h b/adaptors/devel-api/adaptor-framework/vector-animation-renderer.h index 5b3bf35..97bff19 100755 --- a/adaptors/devel-api/adaptor-framework/vector-animation-renderer.h +++ b/adaptors/devel-api/adaptor-framework/vector-animation-renderer.h @@ -82,6 +82,14 @@ public: VectorAnimationRenderer& operator=( const VectorAnimationRenderer& rhs ); /** + * @brief Sets the target image size. + * + * @param[in] width The target image width + * @param[in] height The target image height + */ + void SetSize( uint32_t width, uint32_t height ); + + /** * @brief Starts the rendering. * * @return True if the renderer is successfully started, false otherwise. -- 2.7.4