X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Frenderers%2Fnpatch%2Fnpatch-renderer.h;h=c17b167f8cfd0e35fa464a6c6427033b500cb0ce;hp=6bdb696d9690800cce987c9bdef3a254c3d2a8bf;hb=909f2036cbcc608b50163c497980ed8168ecef1b;hpb=d24bcb053ae2e41161cca4482c0c788f0e745821 diff --git a/dali-toolkit/internal/controls/renderers/npatch/npatch-renderer.h b/dali-toolkit/internal/controls/renderers/npatch/npatch-renderer.h index 6bdb696..c17b167 100644 --- a/dali-toolkit/internal/controls/renderers/npatch/npatch-renderer.h +++ b/dali-toolkit/internal/controls/renderers/npatch/npatch-renderer.h @@ -55,8 +55,10 @@ public: /** * @brief Constructor. + * + * @param[in] factoryCache A pointer pointing to the RendererFactoryCache object */ - NPatchRenderer(); + NPatchRenderer( RendererFactoryCache& factoryCache ); /** * @brief A reference counted object may only be deleted by calling Unreference(). @@ -66,9 +68,9 @@ public: public: // from ControlRenderer /** - * @copydoc ControlRenderer::Initialize + * @copydoc ControlRenderer::GetNaturalSize */ - virtual void Initialize( RendererFactoryCache& factoryCache, const Property::Map& propertyMap ); + virtual void GetNaturalSize( Vector2& naturalSize ) const; /** * @copydoc ControlRenderer::SetClipRect @@ -83,9 +85,20 @@ public: // from ControlRenderer /** * @copydoc ControlRenderer::CreatePropertyMap */ - virtual void CreatePropertyMap( Property::Map& map ) const; + virtual void DoCreatePropertyMap( Property::Map& map ) const; protected: + + /** + * @copydoc ControlRenderer::DoInitialize + */ + virtual void DoInitialize( const Property::Map& propertyMap ); + + /** + * @copydoc ControlRenderer::InitializeRenderer + */ + virtual void InitializeRenderer( Renderer& renderer ); + /** * @copydoc ControlRenderer::DoSetOnStage */ @@ -99,13 +112,6 @@ protected: public: /** - * Request the geometry and shader from the cache, if not available, create and save to the cache for sharing. - * - * @param[in] factoryCache A pointer pointing to the RendererFactoryCache object - */ - void Initialize( RendererFactoryCache& factoryCache ); - - /** * @brief Sets the 9 patch image of this renderer to the resource at imageUrl * The renderer will load the image synchronously when the associated actor is put on stage, and destroy the image when it is off stage * @@ -160,13 +166,13 @@ private: * * @param nPatchImage The NinePatchImage to base our cropped images and stretch borders from */ - void InitialiseFromImage( NinePatchImage nPatchImage ); + void InitializeFromImage( NinePatchImage nPatchImage ); /** - * @brief Creates a black Image to indicate that there was an error in either the image url or the parsing of the image + * @brief Creates an error Image to indicate that there was an error in either the image url or the parsing of the image * */ - void CreateErrorImage(); + void InitializeFromBrokenImage(); /** * @brief Applies this renderer's image to the sampler to the material used for this renderer @@ -177,9 +183,6 @@ private: NinePatchImage mImage; ///< The image to render if the renderer was set from an NinePatchImage, empty otherwise Image mCroppedImage; - Geometry mNinePatchGeometry; - Geometry mNinePatchBorderGeometry; - Shader mNinePatchShader; std::string mImageUrl; ///< The url to the image resource to render if the renderer was set from an image resource url, empty otherwise NinePatchImage::StretchRanges mStretchPixelsX;