Tizen Native API  4.0
Dali::ResourceImage Class Reference

ResourceImage is an image loaded using a URL. More...

Inheritance diagram for Dali::ResourceImage:
Dali::Image Dali::BaseHandle

Public Types

typedef Signal< void(ResourceImage) > ResourceImageSignal
 Type of signal for LoadingFinished and Uploaded.

Public Member Functions

 ResourceImage () DALI_DEPRECATED_API
 Constructor which creates an empty ResourceImage object.
 ~ResourceImage () DALI_DEPRECATED_API
 Destructor.
 ResourceImage (const ResourceImage &handle) DALI_DEPRECATED_API
 This copy constructor is required for (smart) pointer semantics.
ResourceImageoperator= (const ResourceImage &rhs) DALI_DEPRECATED_API
 This assignment operator is required for (smart) pointer semantics.
LoadingState GetLoadingState () const DALI_DEPRECATED_API
 Queries whether the image data has loaded.
std::string GetUrl () const DALI_DEPRECATED_API
 Returns the URL of the image.
void Reload () DALI_DEPRECATED_API
 Reloads image from filesystem.
ResourceImageSignalLoadingFinishedSignal () DALI_DEPRECATED_API
 Emitted when the image data loads successfully, or when the loading fails.

Static Public Member Functions

static ImageDimensions GetImageSize (const std::string &url) DALI_DEPRECATED_API
 Gets the size of an image from disk.
static ResourceImage DownCast (BaseHandle handle) DALI_DEPRECATED_API
 Downcasts a handle to ResourceImage handle.
ResourceImageFactoryFunctions

Creates ResourceImage object instances using these functions.

static ResourceImage New (const std::string &url, bool orientationCorrection=true) DALI_DEPRECATED_API
 Creates an initialized ResourceImage object.
static ResourceImage New (const std::string &url, ImageDimensions size, FittingMode::Type fittingMode=FittingMode::DEFAULT, SamplingMode::Type samplingMode=SamplingMode::DEFAULT, bool orientationCorrection=true) DALI_DEPRECATED_API
 Creates an initialized ResourceImage object.

Detailed Description

ResourceImage is an image loaded using a URL.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41

Customizing load requests

Size, scaling mode, filter mode, and orientation compensation can be set when requesting an image.

Reloading images

The same request used on creating the ResourceImage is re-issued when reloading images. If the file changed since the last load operation, this might result in a different resource. Reload only takes effect if the ResourceImage has already finished loading.

Signals | Signal Name | Method | |----------------------|------------------------------| | imageLoadingFinished | LoadingFinishedSignal() |

Since:
2.4, DALi version 1.0.0

Member Typedef Documentation

Type of signal for LoadingFinished and Uploaded.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41
Since:
2.4, DALi version 1.0.0

Constructor & Destructor Documentation

Constructor which creates an empty ResourceImage object.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41

Use ResourceImage::New(...) to create an initialised object.

Since:
2.4, DALi version 1.0.0

Destructor.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41

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

Since:
2.4, DALi version 1.0.0

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

Deprecated:
Deprecated since 4.0, DALi version 1.2.41
Since:
2.4, DALi version 1.0.0
Parameters:
[in]handleA reference to the copied handle

Member Function Documentation

Downcasts a handle to ResourceImage handle.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41

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

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

Reimplemented from Dali::Image.

static ImageDimensions Dali::ResourceImage::GetImageSize ( const std::string &  url) [static]

Gets the size of an image from disk.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41

This function will read the header info from file on disk and is synchronous, so it should not be used repeatedly or in tight loops.

Since:
2.4, DALi version 1.0.0
Remarks:
http://tizen.org/privilege/mediastorage is needed if url is relevant to media storage.
http://tizen.org/privilege/externalstorage is needed if url is relevant to external storage.
Parameters:
[in]urlThe URL of the image file
Returns:
The width and height in pixels of the image

Queries whether the image data has loaded.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41

The asynchronous loading begins when the Image object is created. After the Image object is discarded, the image data will be released from memory.

Since:
2.4, DALi version 1.0.0
Returns:
The loading state, either Loading, Success or Failed
std::string Dali::ResourceImage::GetUrl ( ) const

Returns the URL of the image.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41
Since:
2.4, DALi version 1.0.0
Returns:
The URL of the image file

Emitted when the image data loads successfully, or when the loading fails.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41
Since:
2.4, DALi version 1.0.0
Returns:
A signal object to Connect() with
static ResourceImage Dali::ResourceImage::New ( const std::string &  url,
bool  orientationCorrection = true 
) [static]

Creates an initialized ResourceImage object.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41

Uses defaults for all options.

See also:
Dali::FittingMode::Type Dali::SamplingMode::Type
Since:
2.4, DALi version 1.0.0
Remarks:
http://tizen.org/privilege/internet is needed if url is a http or https address.
http://tizen.org/privilege/mediastorage is needed if url is relevant to media storage.
http://tizen.org/privilege/externalstorage is needed if url is relevant to external storage.
Parameters:
[in]urlThe URL of the image file to use
[in]orientationCorrectionReorient the image to respect any orientation metadata in its header
Returns:
A handle to a newly allocated object
static ResourceImage Dali::ResourceImage::New ( const std::string &  url,
ImageDimensions  size,
FittingMode::Type  fittingMode = FittingMode::DEFAULT,
SamplingMode::Type  samplingMode = SamplingMode::DEFAULT,
bool  orientationCorrection = true 
) [static]

Creates an initialized ResourceImage object.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41
Since:
2.4, DALi version 1.0.0
Remarks:
http://tizen.org/privilege/internet is needed if url is a http or https address.
http://tizen.org/privilege/mediastorage is needed if url is relevant to media storage.
http://tizen.org/privilege/externalstorage is needed if url is relevant to external storage.
Parameters:
[in]urlThe URL of the image file to use
[in]sizeThe width and height to fit the loaded image to
[in]fittingModeThe method used to fit the shape of the image before loading to the shape defined by the size parameter
[in]samplingModeThe filtering method used when sampling pixels from the input image while fitting it to desired size
[in]orientationCorrectionReorient the image to respect any orientation metadata in its header
Returns:
A handle to a newly allocated object
ResourceImage& Dali::ResourceImage::operator= ( const ResourceImage rhs)

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

Deprecated:
Deprecated since 4.0, DALi version 1.2.41
Since:
2.4, DALi version 1.0.0
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this

Reloads image from filesystem.

Deprecated:
Deprecated since 4.0, DALi version 1.2.41

The original set of image loading attributes (requested dimensions, scaling mode and filter mode) are used when requesting the image again.

Since:
2.4, DALi version 1.0.0
Note:
If image is offstage and OnDemand policy is set, the reload request is ignored.