X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Fcontent%2Fprogramming-guide%2Fimage-actor.h;h=99a42cdb375d8e0541c0cbddf7da6e91b4d3303e;hb=9f3a3fb55f6649f558e72e4b3a3ffdbe3525f617;hp=437e5a8db7f50edbedfe3c373acf7fbc0880eb99;hpb=7dbdc48ead036277d57a6a6ad61d6056c3b39a07;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/docs/content/programming-guide/image-actor.h b/docs/content/programming-guide/image-actor.h index 437e5a8..99a42cd 100644 --- a/docs/content/programming-guide/image-actor.h +++ b/docs/content/programming-guide/image-actor.h @@ -10,46 +10,54 @@ *

Image Actor

* *

Construction

- * The Image Actor is constructed by passing a Dali::Image object + * The Image Actor is constructed by passing a Dali::Image object. + * Dali::Image is an abstract base class with multiple derived classes. + * Dali::ResourceImage is used for the common case of loading an image + * from a file. * * @code - * Dali::Image image = Image::New(myImageFilename); - * Dali::ImageActor myImageActor = ImageActor::New(image); + * Dali::Image image = ResourceImage::New( myImageFilename ); + * Dali::ImageActor myImageActor = ImageActor::New( image ); * @endcode * *

Resizing at Load Time

* An application loading images from an external source will often want to * display those images at a lower resolution than their native ones. - * To support this, %Dali can resize an image at load time so that its in-memory - * copy uses less space and its visual quality benefits from being prefiltered. + * To support this, DALi can resize an image at load time so that its + * in-memory copy uses less space and its visual quality benefits from being + * prefiltered. * There are four algorithms which can be used to fit an image to a desired * rectangle, a desired width or a desired height - * (see Dali::ImageAttributes::ScalingMode). + * (see Dali::FittingMode). * * Here is an example doing rescaling: * * @code - * Dali::ImageAttributes attributes; - * attributes.SetSize( 256, 192 ); - * attributes.SetScalingMode( Dali::ImageAttributes::ScaleToFill ); - * Dali::Image image = Dali::Image::New( filename, attributes ); + * Dali::Image image = Dali::ResourceImage::New( filename, ImageDimensions( 240, 240 ), FittingMode::SCALE_TO_FILL ); * @endcode * - * This example sets the size and scaling mode appropriately for a large thumbnail - * on an Dali::ImageAttributes instance and passes that to Dali::Image construction. - * In general, to enable scaling on load, set-up a Dali::ImageAttributes object with - * a non-zero width or height and one of the four scaling modes, and pass it into a - * Dali::Image creator function as shown above. + * This example sets the size and fitting mode appropriately for a large thumbnail + * during Dali::ResourceImage construction. + * In general, to enable scaling on load, pass a non-zero width or height and + * one of the four fitting modes to the Dali::ResourceImage creator function + * as shown above. * - * The scaling modes and a suggested use-case for each are as follows: + * The fitting modes and a suggested use-case for each are as follows: *
    - *
  1. Dali::ImageAttributes::ShrinkToFit Full-screen image display: Limit loaded image resolution to device resolution. - *
  2. Dali::ImageAttributes::ScaleToFill Thumbnail gallery grid: Limit loaded image resolution to screen tile. - *
  3. Dali::ImageAttributes::FitWidth Image columns: Limit loaded image resolution to column. - *
  4. Dali::ImageAttributes::FitHeight Image rows: Limit loaded image resolution to row height. + *
  5. Dali::FittingMode::SHRINK_TO_FIT Full-screen image display: Limit loaded image resolution to device resolution but show all of image. + *
  6. Dali::FittingMode::SCALE_TO_FILL Thumbnail gallery grid: Limit loaded image resolution to screen tile, filling whole tile but losing a few pixels to match the tile shape. + *
  7. Dali::FittingMode::FIT_WIDTH Image columns: Limit loaded image resolution to column. + *
  8. Dali::FittingMode::FIT_HEIGHT Image rows: Limit loaded image resolution to row height. *
* - * The dali-demo project contains a full example under examples/image. + * The dali-demo project contains a full example under + * examples/image-scaling-and-filtering + * and a specific sampling mode example under + * examples/image-scaling-irregular-grid. + * + * There are more details on this topic in the + * \link resourceimagescaling Rescaling Images \endlink + * section. * *

Style

* The Actor can render an image in two different ways.
@@ -93,4 +101,3 @@ * @endcode * */ -