Tizen Native API  9.0

Functions that deal with images at canvas level. Compare with Image Object Functions functions which deal with images at the object level.

Functions

Eina_Bool evas_object_image_region_support_get (const Evas_Object *obj)
 Get the support state of a given image.
Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj)
 Retrieve whether alpha channel data is being used on the given image object.
void evas_object_image_orient_set (Evas_Object *obj, Evas_Image_Orient orient)
 Set the image orientation.
Evas_Image_Orient evas_object_image_orient_get (const Evas_Object *obj)
 Get the image orientation.
void evas_object_image_scale_hint_set (Evas_Object *obj, Evas_Image_Scale_Hint hint)
 Set the scale hint of a given image of the canvas.
Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj)
 Get the scale hint of a given image of the canvas.
void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace)
 Set the colorspace of a given image of the canvas.
Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj)
 Get the colorspace of a given image of the canvas.
int evas_object_image_stride_get (const Evas_Object *obj)
 Retrieves the row stride of the given image object.
void evas_object_image_data_copy_set (Evas_Object *obj, void *data)
 Replaces the raw image data of the given image object.
void evas_object_image_data_set (Evas_Object *obj, void *data)
 Sets the raw image data of the given image object.
void * evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing)
 Get a pointer to the raw image data of the given image object.
Eina_Bool evas_module_register (const Evas_Module_Api *module, Evas_Module_Type type)
Eina_Bool evas_module_unregister (const Evas_Module_Api *module, Evas_Module_Type type)
Eina_Bool evas_module_task_cancelled (void)

Typedefs

typedef Emile_Image_Scale_Hint Evas_Image_Scale_Hint

Typedef Documentation

typedef Emile_Image_Scale_Hint Evas_Image_Scale_Hint

How an image's data is to be treated by Evas, with regard to scaling cache


Enumeration Type Documentation

Possible outcomes of a load operation.

Enumerator:
EVAS_LOAD_ERROR_NONE 

No error on load

EVAS_LOAD_ERROR_GENERIC 

A non-specific error occurred

EVAS_LOAD_ERROR_DOES_NOT_EXIST 

File (or file path) does not exist

EVAS_LOAD_ERROR_PERMISSION_DENIED 

Permission denied to an existing file (or path)

EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED 

Allocation of resources failure prevented load

EVAS_LOAD_ERROR_CORRUPT_FILE 

File corrupt (but was detected as a known format)

EVAS_LOAD_ERROR_UNKNOWN_FORMAT 

File is not a known format

EVAS_LOAD_ERROR_CANCELLED 

File loading has been cancelled


Function Documentation

Eina_Bool evas_module_register ( const Evas_Module_Api *  module,
Evas_Module_Type  type 
)
Since :
3.0
Since (EFL) :
1.19
Eina_Bool evas_module_unregister ( const Evas_Module_Api *  module,
Evas_Module_Type  type 
)
Since :
3.0

Retrieve whether alpha channel data is being used on the given image object.

This function returns true if the image object's alpha channel is being used, or false otherwise.

Parameters:
[in]objThe object
Returns:
Whether to use alpha channel ($true) data or not ($false).
Since :
2.3
Examples:
evas-images.c.

Get the colorspace of a given image of the canvas.

This function returns the colorspace of given canvas image.

Parameters:
[in]objThe object
Returns:
The new color space.
Since :
2.3

Set the colorspace of a given image of the canvas.

This function sets the colorspace of given canvas image.

Parameters:
[in]objThe object
[in]cspaceThe new color space.
Since :
2.3
void evas_object_image_data_copy_set ( Evas_Object obj,
void *  data 
)

Replaces the raw image data of the given image object.

This function lets the application replace an image object's internal pixel buffer with a user-allocated one. For best results, you should generally first call evas_object_image_size_set with the width and height for the new buffer.

This call is best suited for when you will be using image data with different dimensions than the existing image data, if any. If you only need to modify the existing image in some fashion, then using evas_object_image_data_get is probably what you are after.

Note that the caller is responsible for freeing the buffer when finished with it, as user-set image data will not be automatically freed when the image object is deleted.

Parameters:
[in]objThe object
[in]dataThe raw data to replace.
Since :
2.3
Examples:
efl_thread_6.c.
void* evas_object_image_data_get ( const Evas_Object obj,
Eina_Bool  for_writing 
)

Get a pointer to the raw image data of the given image object.

This function returns a pointer to an image object's internal pixel buffer, for reading only or read/write. If you request it for writing, the image will be marked dirty so that it gets redrawn at the next update.

Each time you call this function on an image object, its data buffer will have an internal reference counter incremented. Decrement it back by using evas_object_image_data_set.

This is best suited for when you want to modify an existing image, without changing its dimensions.

Note:
The contents' format returned by it depend on the color space of the given image object.
You may want to use evas_object_image_data_update_add to inform data changes, if you did any.
Parameters:
[in]objThe object
[in]for_writingWhether the data being retrieved will be modified ($true) or not ($false).
Returns:
The raw image data.
Since :
2.3
void evas_object_image_data_set ( Evas_Object obj,
void *  data 
)

Sets the raw image data of the given image object.

Note that the raw data must be of the same size (see evas_object_image_size_set, which has to be called before this one) and colorspace (see evas_object_image_colorspace_set) of the image. If data is null, the current image data will be freed. Naturally, if one does not set an image object's data manually, it will still have one, allocated by Evas.

Parameters:
[in]objThe object
[in]dataThe raw data, or null.
Since :
2.3
Examples:
evas-images2.c.

Get the image orientation.

Parameters:
[in]objThe object
Returns:
The image orientation Evas_Image_Orient. Default is EVAS_IMAGE_ORIENT_NONE.
Since (EFL) :
1.14
Since :
3.0

Set the image orientation.

This function allows to rotate or flip the image.

Parameters:
[in]objThe object
[in]orientThe image orientation Evas_Image_Orient. Default is EVAS_IMAGE_ORIENT_NONE.
Since (EFL) :
1.14
Since :
3.0

Get the support state of a given image.

Parameters:
[in]objThe object
Returns:
The region support state.
Since (EFL) :
1.2
Since :
2.3

Get the scale hint of a given image of the canvas.

This function returns the scale hint value of the given image object of the canvas.

Parameters:
[in]objThe object
Returns:
The scale hint, a value in Evas_Image_Scale_Hint.
Since :
2.3

Set the scale hint of a given image of the canvas.

This function sets the scale hint value of the given image object in the canvas, which will affect how Evas is to cache scaled versions of its original source image.

Parameters:
[in]objThe object
[in]hintThe scale hint, a value in Evas_Image_Scale_Hint.
Since :
2.3

Retrieves the row stride of the given image object.

The row stride is the number of bytes between the start of a row and the start of the next row for image data.

Parameters:
[in]objThe object
Returns:
The stride of the image (in bytes).
Since :
2.3
Examples:
evas-images2.c.