Tizen Native API
5.0
|
ResourceImage is an image loaded using a URL. More...
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. | |
ResourceImage & | operator= (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. | |
ResourceImageSignal & | LoadingFinishedSignal () 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. |
ResourceImage is an image loaded using a URL.
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() |
typedef Signal< void (ResourceImage) > Dali::ResourceImage::ResourceImageSignal |
Type of signal for LoadingFinished and Uploaded.
Constructor which creates an empty ResourceImage object.
Use ResourceImage::New(...) to create an initialised object.
Destructor.
This is non-virtual since derived Handle types must not contain data or virtual methods.
Dali::ResourceImage::ResourceImage | ( | const ResourceImage & | handle | ) |
This copy constructor is required for (smart) pointer semantics.
[in] | handle | A reference to the copied handle |
static ResourceImage Dali::ResourceImage::DownCast | ( | BaseHandle | handle | ) | [static] |
Downcasts a handle to ResourceImage handle.
If handle points to a ResourceImage object, the downcast produces valid handle. If not, the returned handle is left uninitialized.
[in] | handle | Handle to an object |
Reimplemented from Dali::Image.
static ImageDimensions Dali::ResourceImage::GetImageSize | ( | const std::string & | url | ) | [static] |
Gets the size of an image from disk.
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.
[in] | url | The URL of the image file |
Queries whether the image data has loaded.
The asynchronous loading begins when the Image object is created. After the Image object is discarded, the image data will be released from memory.
std::string Dali::ResourceImage::GetUrl | ( | ) | const |
Returns the URL of the image.
Emitted when the image data loads successfully, or when the loading fails.
static ResourceImage Dali::ResourceImage::New | ( | const std::string & | url, |
bool | orientationCorrection = true |
||
) | [static] |
Creates an initialized ResourceImage object.
Uses defaults for all options.
[in] | url | The URL of the image file to use |
[in] | orientationCorrection | Reorient the image to respect any orientation metadata in its header |
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.
[in] | url | The URL of the image file to use |
[in] | size | The width and height to fit the loaded image to |
[in] | fittingMode | The method used to fit the shape of the image before loading to the shape defined by the size parameter |
[in] | samplingMode | The filtering method used when sampling pixels from the input image while fitting it to desired size |
[in] | orientationCorrection | Reorient the image to respect any orientation metadata in its header |
ResourceImage& Dali::ResourceImage::operator= | ( | const ResourceImage & | rhs | ) |
This assignment operator is required for (smart) pointer semantics.
[in] | rhs | A reference to the copied handle |
void Dali::ResourceImage::Reload | ( | ) |
Reloads image from filesystem.
The original set of image loading attributes (requested dimensions, scaling mode and filter mode) are used when requesting the image again.