Evas_Object_Image_Data (3) - Linux Manuals

Evas_Object_Image_Data: Functions that allow you to access or modify the image pixel data of an image object.

NAME

Image Object Image Data Functions - Functions that allow you to access or modify the image pixel data of an image object.

Functions


EAPI void * evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace)
Converts the raw image data of the given image object to the specified colorspace.
EAPI void evas_object_image_data_set (Evas_Object *obj, void *data)
Sets the raw image data of the given image object.
EAPI void * evas_object_image_data_get (const Evas_Object *obj, Evas_Bool for_writing)
Get a pointer to the raw image data of the given image object.
EAPI void evas_object_image_preload (const Evas_Object *obj, Evas_Bool cancel)
Preload image in the background.
EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data)
Replaces the raw image data of the given image object.
EAPI void evas_object_image_data_update_add (Evas_Object *obj, int x, int y, int w, int h)
Mark a sub-region of the given image object to be redrawn.

Detailed Description

Functions that allow you to access or modify the image pixel data of an image object.

Function Documentation

EAPI void* evas_object_image_data_convert (Evas_Object * obj, Evas_Colorspace to_cspace)

Converts the raw image data of the given image object to the specified colorspace.

Note that this function does not modify the raw image data. If the requested colorspace is the same as the image colorspace nothing is done and NULL is returned. You should use evas_object_image_colorspace_get() to check the current image colorspace.

See evas_object_image_colorspace_get.

Parameters:

obj The given image object.
to_cspace The colorspace to which the image raw data will be converted.

Returns:

data A newly allocated data in the format specified by to_cspace.

EAPI 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.

See evas_object_image_data_get for more details.

Parameters:

obj The given image object.
data The raw data.

EAPI void* evas_object_image_data_get (const Evas_Object * obj, Evas_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.

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

Parameters:

obj The given image object.
for_writing Whether the data being retrieved will be modified.

Returns:

The raw image data.

EAPI 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 and colorspace of the image. If data is NULL the current image data will be freed.

Parameters:

obj The given image object.
data The raw data, or NULL.

References EVAS_LOAD_ERROR_NONE.

EAPI void evas_object_image_data_update_add (Evas_Object * obj, int x, int y, int w, int h)

Mark a sub-region of the given image object to be redrawn.

This function schedules a particular rectangular region of an image object to be updated (redrawn) at the next render.

Parameters:

obj The given image object.
x X-offset of the region to be updated.
y Y-offset of the region to be updated.
w Width of the region to be updated.
h Height of the region to be updated.

References evas_list_append().

Referenced by evas_object_image_alpha_set().

EAPI void evas_object_image_preload (const Evas_Object * obj, Evas_Bool cancel)

Preload image in the background.

This function request the preload of the data image in the background. The worked is queued before being processed.

If cancel is set, it will remove the image from the workqueue.

Parameters:

obj The given image object.
cancel 0 means add to the workqueue, 1 remove it.

Author

Generated automatically by Doxygen for Evas from the source code.