Tizen Native API

An Image object represents an image resource that can be added to ImageViews. More...

Inheritance diagram for Dali::Image:
Dali::BaseHandle Dali::BufferImage Dali::EncodedBufferImage Dali::FrameBufferImage Dali::NativeImage Dali::ResourceImage

Public Types

typedef Signal< void(Image) > ImageSignalType
 Type of signal for Image Uploaded.

Public Member Functions

 Image ()
 Constructor which creates an empty Image handle.
 ~Image ()
 Destructor.
 Image (const Image &handle)
 This copy constructor is required for (smart) pointer semantics.
Imageoperator= (const Image &rhs)
 This assignment operator is required for (smart) pointer semantics.
unsigned int GetWidth () const
 Returns the width of the image.
unsigned int GetHeight () const
 Returns the height of the image.
ImageSignalTypeUploadedSignal ()
 This signal is emitted when the image data gets uploaded to GL.

Static Public Member Functions

static Image DownCast (BaseHandle handle)
 Downcast a handle to Image handle.

Detailed Description

An Image object represents an image resource that can be added to ImageViews.

Image objects can be shared between ImageViews. This is practical if you have a visual element on screen which is repeatedly used. An example would be a button background image. The image resource is discarded when all ImageViews using the Image object are discarded.

Since :
2.4
Note:
If a resource was shared between Image objects it exists until its last reference is gone.

Image objects are responsible for the underlying resource's lifetime.


Member Typedef Documentation

Type of signal for Image Uploaded.

Since :
2.4

Constructor & Destructor Documentation

Constructor which creates an empty Image handle.

Use Image::New to create an initialised handle.

Since :
2.4

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods.

Since :
2.4
Dali::Image::Image ( const Image handle)

This copy constructor is required for (smart) pointer semantics.

Since :
2.4
Parameters:
[in]handleA reference to the copied handle

Member Function Documentation

static Image Dali::Image::DownCast ( BaseHandle  handle) [static]

Downcast a handle to Image handle.

If handle points to a Image object the downcast produces valid handle. If not the returned handle is left uninitialized.

Since :
2.4
Parameters:
[in]handleHandle to an object
Returns:
Handle to a Image object or an uninitialized handle

Reimplemented in Dali::ResourceImage, Dali::BufferImage, Dali::FrameBufferImage, Dali::NativeImage, and Dali::EncodedBufferImage.

unsigned int Dali::Image::GetHeight ( ) const

Returns the height of the image.

Returns either the requested height or the actual loaded height if no specific size was requested.

Since :
2.4
Returns:
Height of the image in pixels.
unsigned int Dali::Image::GetWidth ( ) const

Returns the width of the image.

Returns either the requested width or the actual loaded width if no specific size was requested.

Since :
2.4
Returns:
Width of the image in pixels.
Image& Dali::Image::operator= ( const Image rhs)

This assignment operator is required for (smart) pointer semantics.

Since :
2.4
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this

This signal is emitted when the image data gets uploaded to GL.

It Will be sent after an actor using the image is added to the stage, when such a staged image is reloaded, or when a staged BufferImage calls Update().

Since :
2.4
Returns:
A signal object to Connect() with.