X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Frenderers%2Fgradient%2Fgradient-renderer.h;h=87cb854f0f97beea4df2289db946cadc4d5ce7b9;hp=0c087a29f55cdd23611f8ecf7350dca468d3433e;hb=f3da11c2818c6d17706fbb2417f21b602b3190f5;hpb=80e64104f82d3f0e87a58c12934c50b3a009805f diff --git a/dali-toolkit/internal/controls/renderers/gradient/gradient-renderer.h b/dali-toolkit/internal/controls/renderers/gradient/gradient-renderer.h index 0c087a2..87cb854 100644 --- a/dali-toolkit/internal/controls/renderers/gradient/gradient-renderer.h +++ b/dali-toolkit/internal/controls/renderers/gradient/gradient-renderer.h @@ -40,31 +40,31 @@ class Gradient; * * The following properties are essential for create a LINEAR GradientRender * - * | %Property Name | Type | - * |---------------------------|------------------| - * | gradient-start-position | VECTOR2 | - * | gradient-end-position | VECTOR2 | - * | gradient-stop-offset | ARRAY of FLOAT | - * | gradient-stop-color | ARRAY of VECTOR4 | + * | %Property Name | Type | + * |-------------------------|------------------| + * | gradientStartPosition | VECTOR2 | + * | gradientEndPosition | VECTOR2 | + * | gradientStopOffset | ARRAY of FLOAT | + * | gradientStopColor | ARRAY of VECTOR4 | * * The following properties are essential for create a RADIAL GradientRender * - * | %Property Name | Type | - * |---------------------------|------------------| - * | gradient-center | VECTOR2 | - * | gradient-radius | FLOAT | - * | gradient-stop-offset | ARRAY of FLOAT | - * | gradient-stop-color | ARRAY of VECTOR4 | + * | %Property Name | Type | + * |-------------------------|------------------| + * | gradientCenter | VECTOR2 | + * | gradientRadius | FLOAT | + * | gradientStopOffset | ARRAY of FLOAT | + * | gradientStopColor | ARRAY of VECTOR4 | * * The following properties are optional for both LINEAR and RADIAL GradientRender. * - * | %Property Name | Type | - * |---------------------------|------------------| - * | gradient-units | STRING | - * | gradient-spread-method | STRING | + * | %Property Name | Type | + * |-------------------------|------------------| + * | gradientUnits | STRING | + * | gradientSpreadMethod | STRING | * - * Valid values for gradient-units are 'user-space' and 'object-bounding-box'. - * Valid values for gradient-spread-method are 'pad', 'repeat' and 'reflect.' + * Valid values for gradientUnits are 'userSpace' and 'objectBoundingBox'. + * Valid values for gradientSpreadMethod are 'pad', 'repeat' and 'reflect.' * If not provided, 'objectBoundingBox' is used as default gradient units, and 'pad' is used as default spread method. */ class GradientRenderer: public ControlRenderer @@ -82,8 +82,10 @@ public: /** * @brief Constructor. + * + * @param[in] factoryCache A pointer pointing to the RendererFactoryCache object */ - GradientRenderer(); + GradientRenderer( RendererFactoryCache& factoryCache ); /** * @brief A reference counted object may only be deleted by calling Unreference(). @@ -93,11 +95,6 @@ public: public: // from ControlRenderer /** - * @copydoc ControlRenderer::DoInitialize - */ - virtual void DoInitialize( RendererFactoryCache& factoryCache, const Property::Map& propertyMap ); - - /** * @copydoc ControlRenderer::SetSize */ virtual void SetSize( const Vector2& size ); @@ -119,6 +116,11 @@ public: // from ControlRenderer protected: /** + * @copydoc ControlRenderer::DoInitialize + */ + virtual void DoInitialize( Actor& actor, const Property::Map& propertyMap ); + + /** * @copydoc ControlRenderer::DoSetOnStage */ virtual void DoSetOnStage( Actor& actor ); @@ -126,6 +128,11 @@ protected: private: /** + * @brief Initialize the renderer with the geometry and shader from the cache, if not available, create and save to the cache for sharing. + */ + void InitializeRenderer(); + + /** * New a gradient object with the given property map. * * @return True if the property map provides valid properties to create a gradient. Otherwise, returns false. @@ -150,8 +157,8 @@ private: private: Matrix3 mGradientTransform; - Property::Index mGradientTransformIndex; IntrusivePtr mGradient; + Type mGradientType; }; } // namespace Internal