X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fpublic-api%2Fcontrols%2Fimage-view%2Fimage-view.h;h=898fd3f9b9f7d23bfcc796ab23bab4de93e5e14c;hp=fe6d7b13af37c863c4132637302867adeb2737b8;hb=d43575da616e1370372b1331f47dce36dc4ac145;hpb=07bbc876b9b069903dd4ed86c9dd5f2f66fc3b86 diff --git a/dali-toolkit/public-api/controls/image-view/image-view.h b/dali-toolkit/public-api/controls/image-view/image-view.h index fe6d7b1..898fd3f 100644 --- a/dali-toolkit/public-api/controls/image-view/image-view.h +++ b/dali-toolkit/public-api/controls/image-view/image-view.h @@ -21,6 +21,9 @@ // INTERNAL INCLUDES #include +// EXTERNAL INCLUDES +#include + namespace Dali { @@ -32,7 +35,7 @@ namespace Internal DALI_INTERNAL class ImageView; } /** - * @addtogroup dali-toolkit-controls-image-view + * @addtogroup dali_toolkit_controls_image_view * @{ */ @@ -49,7 +52,10 @@ public: enum PropertyRange { PROPERTY_START_INDEX = Control::CONTROL_PROPERTY_END_INDEX + 1, - PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000 ///< Reserve property indices + PROPERTY_END_INDEX = PROPERTY_START_INDEX + 1000, ///< Reserve property indices + + ANIMATABLE_PROPERTY_START_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX, ///< @since DALi 1.1.18 + ANIMATABLE_PROPERTY_END_INDEX = ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000 ///< Reserve animatable property indices, @since DALi 1.1.18 }; /** @@ -59,7 +65,13 @@ public: { enum { - RESOURCE_URL = PROPERTY_START_INDEX, ///< name "resource-url", @see SetImage(), type string + // Event side properties + RESOURCE_URL = PROPERTY_START_INDEX, ///< name "resourceUrl", @deprecated DALi 1.1.16 Use IMAGE instead. type string + IMAGE, ///< name "image", @see SetImage(), type string if it is a url, map otherwise + PRE_MULTIPLIED_ALPHA, ///< name "preMultipliedAlpha", @since DALi 1.1.18 type Boolean @pre image must be initialized. + + // Animatable properties + PIXEL_AREA = ANIMATABLE_PROPERTY_START_INDEX, ///< name "pixelArea", @since DALi 1.1.18 type Vector4, Pixel area is a relative value with the whole image area as [0.0, 0.0, 1.0, 1.0]. }; }; @@ -74,28 +86,49 @@ public: * @brief Create an initialized ImageView. * * @return A handle to a newly allocated Dali ImageView. + * + * @note ImageView will not display anything. */ static ImageView New(); /** * @brief Create an initialized ImageView from an Image. * - * If the handle is empty, ImageView will display nothing + * If the handle is empty, ImageView will not display anything. + * * @param[in] image The Image to display. * @return A handle to a newly allocated ImageView. */ static ImageView New( Image image ); /** - * @brief Create an initialized ImageView from an Image resource url + * @brief Create an initialized ImageView from an Image resource URL + * + * If the string is empty, ImageView will not display anything. * - * If the string is empty, ImageView will display nothing * @param[in] url The url of the image resource to display. * @return A handle to a newly allocated ImageView. */ static ImageView New( const std::string& url ); /** + * @brief Create an initialized ImageView from an Image resource URL + * + * If the string is empty, ImageView will not display anything. + * + * @since DALi 1.1.10 + * + * @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. + * + * @note A valid size is preferable for efficiency. + * However, do not set a size that is bigger than the actual image size, as up-scaling is not available. + * The content of the area not covered by the actual image is undefined and will not be cleared. + */ + static ImageView New( const std::string& url, ImageDimensions size ); + + /** * @brief Destructor * * This is non-virtual since derived Handle types must not contain data or virtual methods. @@ -137,7 +170,30 @@ public: void SetImage( Image image ); /** - * @brief Gets the Image + * @brief Sets this ImageView from an Image URL + * + * If the URL is empty, ImageView will not display anything. + * + * @since DALi 1.1.4 + * + * @param[in] url The Image resource to display. + */ + void SetImage( const std::string& url ); + + /** + * @brief Sets this ImageView from an Image URL + * + * If the URL is empty, ImageView will not display anything. + * + * @since DALi 1.1.10 + * + * @param[in] url A URL to 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 ); + + /** + * @deprecated Gets the Image * * @return The Image currently set to this ImageView */