X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Fcontrols%2Frenderer-factory%2Frenderer-factory.h;h=c6fc45137909b49066d0431a68f4665b1e099438;hp=13242f4633a5472a715f0d94410835941c8f92d7;hb=a2de9cf491172cd5da9dc9ed60b17683dab6d7bc;hpb=4c1f4bfb9eb5b956b64a6c9bf077217fc0ca9234 diff --git a/dali-toolkit/devel-api/controls/renderer-factory/renderer-factory.h b/dali-toolkit/devel-api/controls/renderer-factory/renderer-factory.h index 13242f4..c6fc451 100644 --- a/dali-toolkit/devel-api/controls/renderer-factory/renderer-factory.h +++ b/dali-toolkit/devel-api/controls/renderer-factory/renderer-factory.h @@ -19,6 +19,7 @@ // EXTERNAL INCLUDES #include +#include // INTERNAK INCLUDES #include @@ -39,11 +40,13 @@ class RendererFactory; /** * @brief RendererFactory is a singleton object that provides and shares renderers for controls * + * By setting environment variable 'DALI_DEBUG_RENDERING', all concrete renderer is replaced with the debug renderer which renders a quad wireframe. + * * The renderer type is required in the property map for requesting a control renderer. * - * | %Property Name | Type | - * |---------------------------|------------------| - * | renderer-type | STRING | + * | %Property Name | Type | + * |--------------------------|------------------| + * | rendererType | STRING | */ class DALI_IMPORT_API RendererFactory : public BaseHandle { @@ -109,10 +112,10 @@ public: * else the renderer would be a handle to a newly created internal color renderer. * * @param[in] renderer The ControlRenderer to reset + * @param[in] actor The Actor the renderer is applied to if, empty if the renderer has not been applied to any Actor * @param[in] color The color to be rendered. - * @return Whether a new internal control renderer is created. */ - bool ResetRenderer( ControlRenderer& renderer, const Vector4& color ); + void ResetRenderer( ControlRenderer& renderer, Actor& actor, const Vector4& color ); /** * @brief Request the control renderer to renderer the border with the given size and color. @@ -124,6 +127,16 @@ public: ControlRenderer GetControlRenderer( float borderSize, const Vector4& borderColor ); /** + * @brief Request the control renderer to renderer the border with the given size and color, and specify whether anti-aliasing is needed. + * + * @param[in] borderSize The size of the border. Border size is the same along all edges. + * @param[in] borderColor The color of the border. + * @param[in] antiAliasing Whether anti-aliasing is required for border rendering. + * @return The pointer pointing to the control renderer + */ + ControlRenderer GetControlRenderer( float borderSize, const Vector4& borderColor, bool antiAliasing ); + + /** * @brief Request the control renderer to render the image. * * @param[in] image The image to be rendered. @@ -138,18 +151,20 @@ public: * else the renderer would be a handle to a newly created internal image renderer. * * @param[in] renderer The ControlRenderer to reset + * @param[in] actor The Actor the renderer is applied to if, empty if the renderer has not been applied to any Actor * @param[in] image The Image to be rendered. - * @return Whether a new internal control renderer is created. */ - bool ResetRenderer( ControlRenderer& renderer, const Image& image ); + void ResetRenderer( ControlRenderer& renderer, Actor& actor, const Image& image ); /** * @brief Request the control renderer to render the given resource at the url. * * @param[in] url The URL to the resource to be rendered. + * @param[in] size The width and height to fit the loaded image to. * @return The pointer pointing to the control renderer */ - ControlRenderer GetControlRenderer( const std::string& url ); + ControlRenderer GetControlRenderer( const std::string& url, + ImageDimensions size = ImageDimensions() ); /** * @brief Request the current control renderer to render the given resource at the url @@ -158,10 +173,12 @@ public: * else the renderer would be a handle to a newly created internal image renderer. * * @param[in] renderer The ControlRenderer to reset + * @param[in] actor The Actor the renderer is applied to if, empty if the renderer has not been applied to any Actor * @param[in] url The URL to the resource to be rendered. - * @return Whether a new internal control renderer is created. + * @param[in] size The width and height to fit the loaded image to. */ - bool ResetRenderer( ControlRenderer& renderer, const std::string& url ); + void ResetRenderer( ControlRenderer& renderer, Actor& actor, const std::string& url, + ImageDimensions size = ImageDimensions() ); /** @@ -170,11 +187,12 @@ public: * if the current renderer is capable of merging with the property map the reset the renderer with the merged properties * else the renderer would be a handle to a newly created internal renderer. * + * @param[in] renderer The ControlRenderer to reset + * @param[in] actor The Actor the renderer is applied to if, empty if the renderer has not been applied to any Actor * @param[in] propertyMap The map contains the properties required by the control renderer * Depends on the content of the map, different kind of renderer would be returned. - * @return Whether a new internal control renderer is created. */ - bool ResetRenderer( ControlRenderer& renderer, const Property::Map& propertyMap ); + void ResetRenderer( ControlRenderer& renderer, Actor& actor, const Property::Map& propertyMap ); private: