// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control.h>
+// EXTERNAL INCLUDES
+#include <dali/public-api/images/image-operations.h>
+
namespace Dali
{
class ImageView;
}
/**
- * @addtogroup dali-toolkit-controls-image-view
+ * @addtogroup dali_toolkit_controls_image_view
* @{
*/
{
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
};
};
/**
* @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
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
*/