X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=docs%2Fcontent%2Fprogramming-guide%2Fimage-view.h;h=9960a3ed6de213527a007afa09a227f1465cbbd5;hb=de0c0ef70719409ce6accc801ff664612a96495e;hp=5822da57a07155a87aec3b7d10a7df9fff4d57b5;hpb=864042717041b6d9ad114b2e2f360f5f07c7682b;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/docs/content/programming-guide/image-view.h b/docs/content/programming-guide/image-view.h index 5822da5..9960a3e 100644 --- a/docs/content/programming-guide/image-view.h +++ b/docs/content/programming-guide/image-view.h @@ -12,7 +12,7 @@ * The Image View is constructed by passing a Dali::Image object or by a url path.
* *

Loading from a url path

- * Image View will load a file from a given url path. Using a url path is the prefered way of displaying an image as the Dali engine can do optimsations to + * Image View will load a file from a given url path. Using a url path is the prefered way of displaying an image as the DALi engine can do optimisations to * reuse shaders and perform automatic image atlassing.
* This can be a path to a image file: * @code @@ -24,6 +24,11 @@ * Dali::Toolkit::ImageView myImageView = ImageView::New( "source-image-url.9.png" ); * @endcode * + * A path to a svg image file: + * @code + * Dali::Toolkit::ImageView myImageView = ImageView::New( "source-image-url.svg" ); + * @endcode + * *

Loading from a Image handle

* Dali::Image is an abstract base class with multiple derived classes. * @@ -33,21 +38,21 @@ * @endcode * *

The IMAGE property

- * the IMAGE property allows you to change many aspects of the image that is renderered. + * the IMAGE property allows you to change many aspects of the image that is rendered. * This property can either be a string for a image url path or a Property::Map that specifies * the image in more detail. * - *

Renderers

- * You can specify a specific renderer instead of using the default Image Renderer, e.g to use the Border Renderer. + *

Visuals

+ * You can specify a specific visual instead of using the default Image Visual, e.g to use the Border Visual. * * @code - * Property::Map renderer; - * renderer.Insert("rendererType","border"); - * renderer.Insert("borderColor",COLOR::RED); - * renderer.Insert("borderSize",20.f); + * Property::Map visual; + * visual.Insert( Visual::Property::Type,Visual::BORDER ); + * visual.Insert( BorderVisual::Property::COLOR, COLOR::RED ); + * visual.Insert( BorderVisual::Property::SIZE, 20.f ); * * Dali::Toolkit::ImageView myImageView = Dali::Toolkit::ImageView::New(); - * myImageView.SetProperty( Control::Property::IMAGE, renderer); + * myImageView.SetProperty( Control::Property::IMAGE, visual ); * @endcode *

Resizing at Load Time

@@ -64,10 +69,10 @@ * * @code * Property::Map imageProperty; - * imageProperty.Insert("imageUrl", "source-image-url.png"); - * imageProperty.Insert("imageFittingMode", "scaleToFill"); - * imageProperty.Insert("fitWidth", 240); - * imageProperty.Insert("fitHeight", 240); + * imageProperty.Insert("url", "source-image-url.png"); + * imageProperty.Insert("fittingMode", "SCALE_TO_FILL"); + * imageProperty.Insert("desiredWidth", 240); + * imageProperty.Insert("desiredHeight", 240); * Dali::Toolkit::ImageView myImageView = Dali::Toolkit::ImageView::New(); * myImageView.SetProperty( Control::Property::IMAGE, imageProperty); @@ -81,10 +86,10 @@ * * The fitting modes and a suggested use-case for each are as follows: *
    - *
  1. "shrinkToFit" Full-screen image display: Limit loaded image resolution to device resolution but show all of image. - *
  2. "scaleToFill" Thumbnail gallery grid: Limit loaded image resolution to screen tile, filling whole tile but losing a few pixels to match the tile shape. - *
  3. "fitWidth" Image columns: Limit loaded image resolution to column. - *
  4. "fitHeight" Image rows: Limit loaded image resolution to row height. + *
  5. "SHRINK_TO_FIT" Full-screen image display: Limit loaded image resolution to device resolution but show all of image. + *
  6. "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. "FIT_WIDTH" Image columns: Limit loaded image resolution to column. + *
  8. "FIT_HEIGHT" Image rows: Limit loaded image resolution to row height. *
* * The dali-demo project contains a full example under @@ -107,7 +112,7 @@ *

Changing the image

* The Image View can be changed by calling Dali::Toolkit::ImageView::SetImage methods or by changing the IMAGE property. * @code - * myImageActor.SetImage( newImage ); + * myImageView.SetImage( newImage ); * @endcode * */