Change-Id: Ib446d1144ba78951be4961115c55800bf69d4ff5
-void VectorAnimationRenderer::Initialize( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height )
+void VectorAnimationRenderer::Initialize( const std::string& url )
- mPlugin.CreateRenderer( url, renderer, width, height );
+ mPlugin.SetUrl( url );
+}
+
+void VectorAnimationRenderer::SetRenderer( Dali::Renderer renderer )
+{
+ mPlugin.SetRenderer( renderer );
}
void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
}
void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
/**
* @brief Initializes member data.
*/
/**
* @brief Initializes member data.
*/
- void Initialize( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height );
+ void Initialize( const std::string& url );
+
+ /**
+ * @copydoc Dali::VectorAnimationRenderer::SetRenderer()
+ */
+ void SetRenderer( Dali::Renderer renderer );
/**
* @copydoc Dali::VectorAnimationRenderer::SetSize()
/**
* @copydoc Dali::VectorAnimationRenderer::SetSize()
-bool VectorAnimationRendererPluginProxy::CreateRenderer( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height )
+void VectorAnimationRendererPluginProxy::SetUrl( const std::string& url )
- return mPlugin->CreateRenderer( url, renderer, width, height );
+ mPlugin->SetUrl( url );
+ }
+}
+
+void VectorAnimationRendererPluginProxy::SetRenderer( Dali::Renderer renderer )
+{
+ if( mPlugin )
+ {
+ mPlugin->SetRenderer( renderer );
}
void VectorAnimationRendererPluginProxy::SetSize( uint32_t width, uint32_t height )
}
void VectorAnimationRendererPluginProxy::SetSize( uint32_t width, uint32_t height )
~VectorAnimationRendererPluginProxy();
/**
~VectorAnimationRendererPluginProxy();
/**
- * @copydoc Dali::VectorAnimationRendererPlugin::CreateRenderer()
+ * @copydoc Dali::VectorAnimationRendererPlugin::SetUrl()
- bool CreateRenderer( const std::string& url, Dali::Renderer renderer, uint32_t width, uint32_t height );
+ void SetUrl( const std::string& url );
+
+ /**
+ * @copydoc Dali::VectorAnimationRendererPlugin::SetRenderer()
+ */
+ void SetRenderer( Dali::Renderer renderer );
/**
* @copydoc Dali::VectorAnimationRendererPlugin::SetSize()
/**
* @copydoc Dali::VectorAnimationRendererPlugin::SetSize()
virtual ~VectorAnimationRendererPlugin() {}
/**
virtual ~VectorAnimationRendererPlugin() {}
/**
- * @brief Creates a renderer to render an vector animation file.
+ * @brief Sets the url of the animation file.
- * @param[in] url The url of an animation file
- * @param[in] renderer The renderer used to render the image
- * @param[in] width The target image width
- * @param[in] height The target image height
- * @return True if the renderer is successfully created, false otherwise
+ * @param[in] url The url of the animation file
+ */
+ virtual void SetUrl( const std::string& url ) = 0;
+
+ /**
+ * @brief Sets the renderer used to display the result image.
+ *
+ * @param[in] renderer The renderer used to display the result image
- virtual bool CreateRenderer( const std::string& url, Renderer renderer, uint32_t width, uint32_t height ) = 0;
+ virtual void SetRenderer( Renderer renderer ) = 0;
/**
* @brief Sets the target image size.
/**
* @brief Sets the target image size.
-VectorAnimationRenderer VectorAnimationRenderer::New( const std::string& url, Renderer renderer, uint32_t width, uint32_t height )
+VectorAnimationRenderer VectorAnimationRenderer::New( const std::string& url )
{
Internal::Adaptor::VectorAnimationRendererPtr animationRenderer = Internal::Adaptor::VectorAnimationRenderer::New();
if( animationRenderer )
{
{
Internal::Adaptor::VectorAnimationRendererPtr animationRenderer = Internal::Adaptor::VectorAnimationRenderer::New();
if( animationRenderer )
{
- animationRenderer->Initialize( url, renderer, width, height );
+ animationRenderer->Initialize( url );
}
return VectorAnimationRenderer( animationRenderer.Get() );
}
return VectorAnimationRenderer( animationRenderer.Get() );
+void VectorAnimationRenderer::SetRenderer( Renderer renderer )
+{
+ GetImplementation( *this ).SetRenderer( renderer );
+}
+
void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
{
GetImplementation( *this ).SetSize( width, height );
void VectorAnimationRenderer::SetSize( uint32_t width, uint32_t height )
{
GetImplementation( *this ).SetSize( width, height );
* @brief Creates an initialized handle to a new VectorAnimationRenderer.
*
* @param[in] url The url of the vector animation file
* @brief Creates an initialized handle to a new VectorAnimationRenderer.
*
* @param[in] url The url of the vector animation file
- * @param[in] renderer The renderer used to render the image
- * @param[in] width The width of the content
- * @param[in] height The height of the content
* @return A handle to a newly allocated VectorAnimationRenderer
*/
* @return A handle to a newly allocated VectorAnimationRenderer
*/
- static VectorAnimationRenderer New( const std::string& url, Renderer renderer, uint32_t width, uint32_t height );
+ static VectorAnimationRenderer New( const std::string& url );
/**
* @brief Creates an empty handle.
/**
* @brief Creates an empty handle.
VectorAnimationRenderer& operator=( const VectorAnimationRenderer& rhs );
/**
VectorAnimationRenderer& operator=( const VectorAnimationRenderer& rhs );
/**
+ * @brief Sets the renderer used to display the result image.
+ *
+ * @param[in] renderer The renderer used to display the result image
+ */
+ void SetRenderer( Renderer renderer );
+
+ /**
* @brief Sets the target image size.
*
* @param[in] width The target image width
* @brief Sets the target image size.
*
* @param[in] width The target image width