Download

Support

Image Object Image Data Functions

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

Functions

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 (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_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_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 ( 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().


Copyright © Enlightenment.org