Remove OnControl methods & add up-calls
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / renderers / image-atlas-manager.h
index b0729dd..8b562a9 100644 (file)
@@ -67,7 +67,7 @@ public:
    * @param [in] size The width and height to fit the loaded image to.
    * @param [in] fittingMode The method used to fit the shape of the image before loading to the shape defined by the size parameter.
    * @param [in] orientationCorrection Reorient the image to respect any orientation metadata in its header.
-   * @return True if there is enough space to fit this image in,false otherwise.
+   * @return The material containing the image.
    */
   Material Add( Vector4& textureRect,
                 const std::string& url,
@@ -76,6 +76,16 @@ public:
                 bool orientationCorrection = true );
 
   /**
+   * @brief Add a pixel buffer to the atlas
+   *
+   * @param [out] textureRect The texture area of the resource image in the atlas.
+   * @param [in] pixelData The pixel data.
+   * @return The material containing the image.
+   */
+  Material Add( Vector4& textureRect,
+                PixelDataPtr pixelData );
+
+  /**
    * Remove the image at the given rectangle from the material.
    *
    * @param [in] material The material containing the atlas image.
@@ -90,6 +100,15 @@ public:
    */
   void SetBrokenImage( const std::string& brokenImageUrl );
 
+private:
+
+  /**
+   * @brief Create a new atlas.
+   *
+   * This method is called when the newly added image or pixel buffer cannot fit into the current atlas list.
+   */
+  void CreateNewAtlas();
+
 protected:
 
   /**