Automatic image atlasing
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / public-api / controls / image-view / image-view.h
index fe6d7b1..4a7545e 100644 (file)
@@ -21,6 +21,9 @@
 // INTERNAL INCLUDES
 #include <dali-toolkit/public-api/controls/control.h>
 
+// EXTERNAL INCLUDES
+#include <dali/public-api/images/image-operations.h>
+
 namespace Dali
 {
 
@@ -32,7 +35,7 @@ namespace Internal DALI_INTERNAL
 class ImageView;
 }
 /**
- * @addtogroup dali-toolkit-controls-image-view
+ * @addtogroup dali_toolkit_controls_image_view
  * @{
  */
 
@@ -59,7 +62,7 @@ public:
   {
     enum
     {
-      RESOURCE_URL = PROPERTY_START_INDEX, ///< name "resource-url", @see SetImage(), type string
+      IMAGE = PROPERTY_START_INDEX, ///< name "image", @see SetImage(), type string if it is a url, map otherwise
     };
   };
 
@@ -89,11 +92,17 @@ public:
   /**
    * @brief Create an initialized ImageView from an Image resource url
    *
+   * @note A valid size is preferable for efficiency.
+   *       However, do not set size that is bigger than the actual image size, as the up-scaling is not available,
+   *       the content of the area not covered by actual image is undefined, it will not be cleared.
+   *
    * If the string is empty, ImageView will display nothing
    * @param[in] url The url of the image resource to display.
+   * @param [in] size The width and height to fit the loaded image to.
    * @return A handle to a newly allocated ImageView.
    */
-  static ImageView New( const std::string& url );
+  static ImageView New( const std::string& url,
+                        ImageDimensions size = ImageDimensions() );
 
   /**
    * @brief Destructor
@@ -137,7 +146,20 @@ public:
   void SetImage( Image image );
 
   /**
-   * @brief Gets the Image
+   * @brief Sets this ImageView from an Image url
+   *
+   * If the handle is empty, ImageView will display nothing
+   *
+   * @since DALi 1.1.4
+   *
+   * @param[in] url The Image resource to display.
+   * @param [in] size The width and height to fit the loaded image to.
+   */
+  void SetImage( const std::string& url,
+                 ImageDimensions size = ImageDimensions() );
+
+  /**
+   * @deprecated Gets the Image
    *
    * @return The Image currently set to this ImageView
    */