Merge branch 'devel/master (1.1.16)' into tizen
[platform/core/uifw/dali-core.git] / dali / internal / event / actors / image-actor-impl.h
index 654e7fe..a9e2f6f 100644 (file)
@@ -21,6 +21,7 @@
 // INTERNAL INCLUDES
 #include <dali/public-api/object/ref-object.h>
 #include <dali/public-api/actors/image-actor.h>
+#include <dali/public-api/math/uint-16-pair.h>
 #include <dali/devel-api/rendering/cull-face.h>
 #include <dali/internal/event/actors/actor-declarations.h>
 #include <dali/internal/event/actors/actor-impl.h>
@@ -99,6 +100,26 @@ public:
   void ClearPixelArea();
 
   /**
+   * @copydoc Dali::ImageActor::SetStyle()
+   */
+  void SetStyle( Dali::ImageActor::Style style );
+
+  /**
+   * @copydoc Dali::ImageActor::GetStyle()
+   */
+  Dali::ImageActor::Style GetStyle() const;
+
+  /**
+   * @copydoc Dali::ImageActor::SetNinePatchBorder()
+   */
+  void SetNinePatchBorder( const Vector4& border );
+
+  /**
+   * @copydoc Dali::ImageActor::GetNinePatchBorder()
+   */
+  Vector4 GetNinePatchBorder() const;
+
+  /**
    * @copydoc Dali::RenderableActor::SetSortModifier()
    */
   void SetSortModifier(float modifier);
@@ -181,13 +202,6 @@ public:
   void GetFilterMode( FilterMode::Type& minFilter, FilterMode::Type& magFilter ) const;
 
   /**
-   * @brief Allows this ImageActor to respond to the event that the a shader effect's uniform has updated
-   *
-   * @param[in] uniform The shader effect uniform that has been updated
-   */
-  void EffectUniformUpdated( const ShaderEffect::Uniform& uniform );
-
-  /**
    * @brief Allows this ImageActor to respond to the eventa that the shader effect's effect texture has been changed
    */
   void EffectImageUpdated();
@@ -289,22 +303,30 @@ private:
   Vector2 CalculateNaturalSize() const;
 
   /**
-   * @copydoc Dali::Actor::OnRelayout()
+   * Update the grid geometry.
+   */
+  void UpdateGeometry();
+
+  /**
+   * Update the texture rect uniform
    */
-  virtual void OnRelayout( const Vector2& size, RelayoutContainer& container );
+  void UpdateTexureRect();
 
 private:
 
-  ShaderEffectPtr    mShaderEffect;            ///< Optional referenced shader effect
-  RendererPtr        mRenderer;                ///< The renderer used to render the image
-  PixelArea          mPixelArea;               ///< The pixel area of the image to render
-  Vector4            mBlendColor;              ///< The blend color for this ImageActor
-  int                mRendererIndex;           ///< The index location of mRenderer
-  size_t             mTextureIndex;                       ///< The texture index for this ImageActor's texture
-  size_t             mEffectTextureIndex;      ///< The texture index for this ImageActor's effect texture
-  FilterMode::Type   mMinFilter;               ///< The minification filter currently set
-  FilterMode::Type   mMagFilter;               ///< The magnification filter currently set
-  bool               mIsPixelAreaSet;          ///< Flag indicating if the pixel area has been set
+  ShaderEffectPtr         mShaderEffect;            ///< Optional referenced shader effect
+  RendererPtr             mRenderer;                ///< The renderer used to render the image
+  PixelArea               mPixelArea;               ///< The pixel area of the image to render
+  Vector4                 mBlendColor;              ///< The blend color for this ImageActor
+  Vector4                 mNinePatchBorder;         ///< Nine-patch not supported, but this is used to store what is set so it can be returned for backwards compatibility.
+  Uint16Pair              mGridSize;                ///< The geometry grid size
+  int                     mRendererIndex;           ///< The index location of mRenderer
+  size_t                  mTextureIndex;            ///< The texture index for this ImageActor's texture
+  size_t                  mEffectTextureIndex;      ///< The texture index for this ImageActor's effect texture
+  FilterMode::Type        mMinFilter;               ///< The minification filter currently set
+  FilterMode::Type        mMagFilter;               ///< The magnification filter currently set
+  Dali::ImageActor::Style mStyle;                   ///< The style set by SetStyle. Not used internally, only used to store what is set so it can be returned for backwards compatibility.
+  bool                    mIsPixelAreaSet;          ///< Flag indicating if the pixel area has been set
 };
 
 } // namespace Internal