virtual ~VectorAnimationRendererPlugin() {}
/**
- * @brief Sets the url of the animation file.
+ * @brief Second-phase constructor.
*
* @param[in] url The url of the animation file
*/
- virtual void SetUrl( const std::string& url ) = 0;
+ virtual bool Initialize( const std::string& url ) = 0;
/**
* @brief Sets the renderer used to display the result image.
*/
virtual void SetSize( uint32_t width, uint32_t height ) = 0;
- /**
- * @brief Starts the rendering.
- *
- * @return True if the renderer is successfully started, false otherwise
- */
- virtual bool StartRender() = 0;
-
/**
* @brief Stops the rendering.
*/
*/
virtual float GetFrameRate() const = 0;
+ /**
+ * @brief Gets the default size of the file,.
+ *
+ * @return The default size of the file
+ */
+ virtual void GetDefaultSize( uint32_t& width, uint32_t& height ) const = 0;
+
/**
* @brief Function pointer called in adaptor to create a plugin instance.
*/
GetImplementation( *this ).SetSize( width, height );
}
-bool VectorAnimationRenderer::StartRender()
-{
- return GetImplementation( *this ).StartRender();
-}
-
void VectorAnimationRenderer::StopRender()
{
GetImplementation( *this ).StopRender();
return GetImplementation( *this ).GetFrameRate();
}
+void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height ) const
+{
+ GetImplementation( *this ).GetDefaultSize( width, height );
+}
+
} // namespace Dali
*/
void SetSize( uint32_t width, uint32_t height );
- /**
- * @brief Starts the rendering.
- *
- * @return True if the renderer is successfully started, false otherwise.
- */
- bool StartRender();
-
/**
* @brief Stops the rendering.
*/
*/
float GetFrameRate() const;
+ /**
+ * @brief Gets the default size of the file,.
+ *
+ * @return The default size of the file
+ */
+ void GetDefaultSize( uint32_t& width, uint32_t& height ) const;
+
public: // Signals
public: // Not intended for application developers
void VectorAnimationRenderer::Initialize( const std::string& url )
{
- mPlugin.SetUrl( url );
+ mPlugin.Initialize( url );
}
void VectorAnimationRenderer::SetRenderer( Dali::Renderer renderer )
mPlugin.SetSize( width, height );
}
-bool VectorAnimationRenderer::StartRender()
-{
- return mPlugin.StartRender();
-}
-
void VectorAnimationRenderer::StopRender()
{
mPlugin.StopRender();
return mPlugin.GetFrameRate();
}
+void VectorAnimationRenderer::GetDefaultSize( uint32_t& width, uint32_t& height ) const
+{
+ mPlugin.GetDefaultSize( width, height );
+}
+
} // namespace Adaptor
} // namespace internal
*/
void SetSize( uint32_t width, uint32_t height );
- /**
- * @copydoc Dali::VectorAnimationRenderer::StartRender()
- */
- bool StartRender();
-
/**
* @copydoc Dali::VectorAnimationRenderer::StopRender()
*/
*/
float GetFrameRate() const;
+ /**
+ * @copydoc Dali::VectorAnimationRenderer::GetDefaultSize()
+ */
+ void GetDefaultSize( uint32_t& width, uint32_t& height ) const;
+
private:
/**
}
}
-void VectorAnimationRendererPluginProxy::SetUrl( const std::string& url )
+bool VectorAnimationRendererPluginProxy::Initialize( const std::string& url )
{
if( mPlugin )
{
- mPlugin->SetUrl( url );
+ return mPlugin->Initialize( url );
}
+ return false;
}
void VectorAnimationRendererPluginProxy::SetRenderer( Dali::Renderer renderer )
}
}
-bool VectorAnimationRendererPluginProxy::StartRender()
-{
- if( mPlugin )
- {
- return mPlugin->StartRender();
- }
- return false;
-}
-
void VectorAnimationRendererPluginProxy::StopRender()
{
if( mPlugin )
return 0.0f;
}
+void VectorAnimationRendererPluginProxy::GetDefaultSize( uint32_t& width, uint32_t& height ) const
+{
+ if( mPlugin )
+ {
+ mPlugin->GetDefaultSize( width, height );
+ }
+}
+
} // namespace Adaptor
} // namespace Internal
~VectorAnimationRendererPluginProxy();
/**
- * @copydoc Dali::VectorAnimationRendererPlugin::SetUrl()
+ * @copydoc Dali::VectorAnimationRendererPlugin::Initialize()
*/
- void SetUrl( const std::string& url );
+ bool Initialize( const std::string& url );
/**
* @copydoc Dali::VectorAnimationRendererPlugin::SetRenderer()
*/
void SetSize( uint32_t width, uint32_t height );
- /**
- * @copydoc Dali::VectorAnimationRendererPlugin::StartRender()
- */
- bool StartRender();
-
/**
* @copydoc Dali::VectorAnimationRendererPlugin::StopRender()
*/
*/
float GetFrameRate() const;
+ /**
+ * @copydoc Dali::VectorAnimationRendererPlugin::GetDefaultSize()
+ */
+ void GetDefaultSize( uint32_t& width, uint32_t& height ) const;
+
// Not copyable or movable
VectorAnimationRendererPluginProxy( const VectorAnimationRendererPluginProxy& ) = delete; ///< Deleted copy constructor
VectorAnimationRendererPluginProxy( VectorAnimationRendererPluginProxy&& ) = delete; ///< Deleted move constructor