Functions that deal with images at canvas level. More...
Data Structures | |
struct | _Evas_Image_Load_Opts |
struct | _Evas_Image_Property |
struct | _Evas_Image_Load_Func |
Macros | |
#define | EVAS_IMAGE_CLASS evas_image_class_get() |
Internal class for legacy support of Evas Image. | |
#define | EVAS_IMAGE_ANIMATED_HINT_NONE EMILE_IMAGE_ANIMATED_HINT_NONE |
#define | EVAS_IMAGE_ANIMATED_HINT_LOOP EMILE_IMAGE_ANIMATED_HINT_LOOP |
#define | EVAS_IMAGE_ANIMATED_HINT_PINGPONG EMILE_IMAGE_ANIMATED_HINT_PINGPONG |
#define | EVAS_IMAGE_SCALE_HINT_NONE EMILE_IMAGE_SCALE_HINT_NONE |
#define | EVAS_IMAGE_SCALE_HINT_DYNAMIC EMILE_IMAGE_SCALE_HINT_DYNAMIC |
#define | EVAS_IMAGE_SCALE_HINT_STATIC EMILE_IMAGE_SCALE_HINT_STATIC |
#define | EVAS_COLORSPACE_ARGB8888 EMILE_COLORSPACE_ARGB8888 |
#define | EVAS_COLORSPACE_YCBCR422P601_PL EMILE_COLORSPACE_YCBCR422P601_PL |
#define | EVAS_COLORSPACE_YCBCR422P709_PL EMILE_COLORSPACE_YCBCR422P709_PL |
#define | EVAS_COLORSPACE_RGB565_A5P EMILE_COLORSPACE_RGB565_A5P |
#define | EVAS_COLORSPACE_GRY8 EMILE_COLORSPACE_GRY8 |
#define | EVAS_COLORSPACE_YCBCR422601_PL EMILE_COLORSPACE_YCBCR422601_PL |
#define | EVAS_COLORSPACE_YCBCR420NV12601_PL EMILE_COLORSPACE_YCBCR420NV12601_PL |
#define | EVAS_COLORSPACE_YCBCR420TM12601_PL EMILE_COLORSPACE_YCBCR420TM12601_PL |
#define | EVAS_COLORSPACE_AGRY88 EMILE_COLORSPACE_AGRY88 |
#define | EVAS_COLORSPACE_ETC1 EMILE_COLORSPACE_ETC1 |
#define | EVAS_COLORSPACE_RGB8_ETC2 EMILE_COLORSPACE_RGB8_ETC2 |
#define | EVAS_COLORSPACE_RGBA8_ETC2_EAC EMILE_COLORSPACE_RGBA8_ETC2_EAC |
#define | EVAS_COLORSPACE_ETC1_ALPHA EMILE_COLORSPACE_ETC1_ALPHA |
#define | EVAS_COLORSPACE_RGB_S3TC_DXT1 EMILE_COLORSPACE_RGB_S3TC_DXT1 |
#define | EVAS_COLORSPACE_RGBA_S3TC_DXT1 EMILE_COLORSPACE_RGBA_S3TC_DXT1 |
#define | EVAS_COLORSPACE_RGBA_S3TC_DXT2 EMILE_COLORSPACE_RGBA_S3TC_DXT2 |
#define | EVAS_COLORSPACE_RGBA_S3TC_DXT3 EMILE_COLORSPACE_RGBA_S3TC_DXT3 |
#define | EVAS_COLORSPACE_RGBA_S3TC_DXT4 EMILE_COLORSPACE_RGBA_S3TC_DXT4 |
#define | EVAS_COLORSPACE_RGBA_S3TC_DXT5 EMILE_COLORSPACE_RGBA_S3TC_DXT5 |
#define | EVAS_IMAGE_LOAD_VERSION 2 |
#define | EVAS_MODULE_TASK_CHECK(Count, Mask, Error, Error_Handler) |
#define | EVAS_MODULE_DEFINE(Type, Tn, Name) |
#define | EVAS_EINA_MODULE_DEFINE(Tn, Name) |
Typedefs | |
typedef struct _Evas_Image_Load_Opts | Evas_Image_Load_Opts |
typedef Emile_Image_Animated | Evas_Image_Animated |
typedef struct _Evas_Image_Property | Evas_Image_Property |
typedef struct _Evas_Image_Load_Func | Evas_Image_Load_Func |
typedef Emile_Image_Animated_Loop_Hint | Evas_Image_Animated_Loop_Hint |
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. | |
Enumerations | |
enum | Evas_Load_Error { EVAS_LOAD_ERROR_NONE = 0 , EVAS_LOAD_ERROR_GENERIC , EVAS_LOAD_ERROR_DOES_NOT_EXIST , EVAS_LOAD_ERROR_PERMISSION_DENIED , EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED , EVAS_LOAD_ERROR_CORRUPT_FILE , EVAS_LOAD_ERROR_UNKNOWN_FORMAT , EVAS_LOAD_ERROR_CANCELLED } |
Possible outcomes of a load operation. More... | |
Functions | |
EVAS_API Eina_Bool | evas_object_image_region_support_get (const Evas_Object *obj) |
Get the support state of a given image. More... | |
EVAS_API Eina_Bool | evas_object_image_alpha_get (const Evas_Object *obj) |
Retrieve whether alpha channel data is being used on the given image object. More... | |
EVAS_API void | evas_object_image_orient_set (Evas_Object *obj, Evas_Image_Orient orient) |
Set the image orientation. More... | |
EVAS_API Evas_Image_Orient | evas_object_image_orient_get (const Evas_Object *obj) |
Get the image orientation. More... | |
EVAS_API 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. More... | |
EVAS_API 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. More... | |
EVAS_API void | evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace) |
Set the colorspace of a given image of the canvas. More... | |
EVAS_API Evas_Colorspace | evas_object_image_colorspace_get (const Evas_Object *obj) |
Get the colorspace of a given image of the canvas. More... | |
EVAS_API int | evas_object_image_stride_get (const Evas_Object *obj) |
Retrieves the row stride of the given image object. More... | |
EVAS_API void | evas_object_image_data_copy_set (Evas_Object *obj, void *data) |
Replaces the raw image data of the given image object. More... | |
EVAS_API void | evas_object_image_data_set (Evas_Object *obj, void *data) |
Sets the raw image data of the given image object. More... | |
EVAS_API 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. More... | |
EVAS_API Eina_Bool | evas_module_register (const Evas_Module_Api *module, Evas_Module_Type type) |
EVAS_API Eina_Bool | evas_module_unregister (const Evas_Module_Api *module, Evas_Module_Type type) |
EVAS_API Eina_Bool | evas_module_task_cancelled (void) |
static Eina_Bool | evas_loader_helper_stretch_region_push (uint8_t **region, uint8_t *offset, Eina_Bool stretchable) |
Functions that deal with images at canvas level.
Compare with Image Object Functions functions which deal with images at the object level.
#define EVAS_MODULE_TASK_CHECK | ( | Count, | |
Mask, | |||
Error, | |||
Error_Handler | |||
) |
#define EVAS_MODULE_DEFINE | ( | Type, | |
Tn, | |||
Name | |||
) |
#define EVAS_EINA_MODULE_DEFINE | ( | Tn, | |
Name | |||
) |
enum Evas_Load_Error |
Possible outcomes of a load operation.
EVAS_API Eina_Bool evas_object_image_region_support_get | ( | const Evas_Object * | obj | ) |
Get the support state of a given image.
[in] | obj | The object |
References EINA_FALSE.
EVAS_API Eina_Bool evas_object_image_alpha_get | ( | const Evas_Object * | obj | ) |
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.
[in] | obj | The object |
References EINA_FALSE.
EVAS_API void evas_object_image_orient_set | ( | Evas_Object * | obj, |
Evas_Image_Orient | orient | ||
) |
Set the image orientation.
This function allows to rotate or flip the image.
[in] | obj | The object |
[in] | orient | The image orientation Evas_Image_Orient. Default is EVAS_IMAGE_ORIENT_NONE. |
EVAS_API Evas_Image_Orient evas_object_image_orient_get | ( | const Evas_Object * | obj | ) |
Get the image orientation.
[in] | obj | The object |
References EVAS_IMAGE_ORIENT_NONE.
EVAS_API 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.
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.
[in] | obj | The object |
[in] | hint | The scale hint, a value in Evas_Image_Scale_Hint. |
EVAS_API 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.
This function returns the scale hint value of the given image object of the canvas.
[in] | obj | The object |
EVAS_API void evas_object_image_colorspace_set | ( | Evas_Object * | obj, |
Evas_Colorspace | cspace | ||
) |
Set the colorspace of a given image of the canvas.
This function sets the colorspace of given canvas image.
[in] | obj | The object |
[in] | cspace | The new color space. |
Referenced by ecore_evas_object_image_new().
EVAS_API Evas_Colorspace evas_object_image_colorspace_get | ( | const Evas_Object * | obj | ) |
Get the colorspace of a given image of the canvas.
This function returns the colorspace of given canvas image.
[in] | obj | The object |
EVAS_API int evas_object_image_stride_get | ( | const Evas_Object * | obj | ) |
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.
[in] | obj | The object |
EVAS_API 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.
[in] | obj | The object |
[in] | data | The raw data to replace. |
References EINA_TRUE.
EVAS_API 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.
[in] | obj | The object |
[in] | data | The raw data, or null . |
References EINA_FALSE, eina_hash_del(), eina_hash_find(), and EINA_TRUE.
EVAS_API 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.
[in] | obj | The object |
[in] | for_writing | Whether the data being retrieved will be modified ($true) or not ($false). |
References eina_hash_add(), eina_hash_pointer_new(), and EINA_TRUE.
EVAS_API Eina_Bool evas_module_task_cancelled | ( | void | ) |
References EINA_FALSE, and eina_tls_get().