Image Object Functions
[Specific Object Functions]

Functions used to create and manipulate image objects. More...

Typedefs

typedef enum _Evas_Colorspace Evas_Colorspace
 Colorspaces for pixel data supported by Evas.

Enumerations

enum  _Evas_Colorspace {
  EVAS_COLORSPACE_ARGB8888,
  EVAS_COLORSPACE_YCBCR422P601_PL,
  EVAS_COLORSPACE_YCBCR422P709_PL,
  EVAS_COLORSPACE_RGB565_A5P,
  EVAS_COLORSPACE_GRY8
}
 

Colorspaces for pixel data supported by Evas.

More...

Functions

EAPI Evas_Objectevas_object_image_add (Evas *e)
 Creates a new image object on the given evas.
EAPI Evas_Objectevas_object_image_filled_add (Evas *e)
 Creates a new image object that automatically scales on the given evas.
EAPI void evas_object_image_file_set (Evas_Object *obj, const char *file, const char *key)
 Sets the filename and key of the given image object.
EAPI void evas_object_image_file_get (const Evas_Object *obj, const char **file, const char **key)
 Retrieves the filename and key of the given image object.
EAPI void evas_object_image_border_set (Evas_Object *obj, int l, int r, int t, int b)
 Sets how much of each border of the given image object is not to be scaled.
EAPI void evas_object_image_border_get (const Evas_Object *obj, int *l, int *r, int *t, int *b)
 Retrieves how much of each border of the given image object is not to be scaled.
EAPI void evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill)
 Sets if the center part of the given image object (not the border) should be drawn.
EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj)
 Retrieves if the center of the given image object is to be drawn or not.
EAPI void evas_object_image_filled_set (Evas_Object *obj, Eina_Bool setting)
 Sets if image fill property should track object size.
EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj)
 Retrieves if image fill property is tracking object size.
EAPI void evas_object_image_border_scale_set (Evas_Object *obj, double scale)
 Sets a scale factor (multiplier) for the borders of an image.
EAPI double evas_object_image_border_scale_get (const Evas_Object *obj)
 Retrieves the border scale factor.
EAPI void evas_object_image_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
 Sets the rectangle of the given image object that the image will be drawn to.
EAPI void evas_object_image_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
 Retrieves the dimensions of the rectangle of the given image object that the image will be drawn to.
EAPI void evas_object_image_fill_spread_set (Evas_Object *obj, Evas_Fill_Spread spread)
 Sets the tiling mode for the given evas image object's fill.
EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj)
 Retrieves the spread (tiling mode) for the given image object's fill.
EAPI void evas_object_image_size_set (Evas_Object *obj, int w, int h)
 Sets the size of the given image object.
EAPI void evas_object_image_size_get (const Evas_Object *obj, int *w, int *h)
 Retrieves the size of the given image object.
EAPI int evas_object_image_stride_get (const Evas_Object *obj)
 Retrieves the row stride of the given image object,.
EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj)
 Retrieves a number representing any error that occurred during the last load of the given image object.
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, Eina_Bool for_writing)
 Get a pointer to the raw image data of the given image object.
EAPI void evas_object_image_preload (Evas_Object *obj, Eina_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.
EAPI void evas_object_image_alpha_set (Evas_Object *obj, Eina_Bool has_alpha)
 Enable or disable alpha channel of the given image object.
EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj)
 Retrieves the alpha channel setting of the given image object.
EAPI void evas_object_image_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth_scale)
 Sets whether to use of high-quality image scaling algorithm of the given image object.
EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj)
 Retrieves whether the given image object is using use a high-quality image scaling algorithm.
EAPI void evas_object_image_reload (Evas_Object *obj)
 Reload a image of the canvas.
EAPI Eina_Bool evas_object_image_save (const Evas_Object *obj, const char *file, const char *key, const char *flags)
 Save the given image object to a file.
EAPI Eina_Bool evas_object_image_pixels_import (Evas_Object *obj, Evas_Pixel_Import_Source *pixels)
 Import pixels from given source to a given canvas image object.
EAPI void evas_object_image_pixels_get_callback_set (Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data)
 Set the callback function to get pixels from a canva's image.
EAPI void evas_object_image_pixels_dirty_set (Evas_Object *obj, Eina_Bool dirty)
 Mark whether the given image object is dirty (needs to be redrawn).
EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj)
 Retrieves whether the given image object is dirty (needs to be redrawn).
EAPI void evas_object_image_load_dpi_set (Evas_Object *obj, double dpi)
 Set the dpi resolution of a loaded image of the canvas.
EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj)
 Get the dpi resolution of a loaded image of the canvas.
EAPI void evas_object_image_load_size_set (Evas_Object *obj, int w, int h)
 Set the size of a loaded image of the canvas.
EAPI void evas_object_image_load_size_get (const Evas_Object *obj, int *w, int *h)
 Get the size of a loaded image of the canvas.
EAPI void evas_object_image_load_scale_down_set (Evas_Object *obj, int scale_down)
 Set the scale down of a loaded image of the canvas.
EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj)
 Get the scale down value of given image of the canvas.
EAPI void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace)
 Set the colorspace of a given image of the canvas.
EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj)
 Get the colorspace of a given image of the canvas.
EAPI void evas_object_image_native_surface_set (Evas_Object *obj, Evas_Native_Surface *surf)
 Set the native surface of a given image of the canvas.
EAPI Evas_Native_Surfaceevas_object_image_native_surface_get (const Evas_Object *obj)
 Get the native surface of a given image of the canvas.
EAPI 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.
EAPI 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.
EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint)
 Set the content hint of a given image of the canvas.
EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj)
 Get the content hint of a given image of the canvas.

Detailed Description

Functions used to create and manipulate image objects.

Note - Image objects may return or accept "image data" in multiple formats. This is based on the colorspace of an object. Here is a rundown on formats:

EVAS_COLORSPACE_ARGB8888:

This pixel format is a linear block of pixels, starting at the top-left row by row until the bottom right of the image or pixel region. All pixels are 32-bit unsigned int's with the high-byte being alpha and the low byte being blue in the format ARGB. Alpha may or may not be used by evas depending on the alpha flag of the image, but if not used, should be set to 0xff anyway.

This colorspace uses premultiplied alpha. That means that R, G and B cannot exceed A in value. The conversion from non-premultiplied colorspace is:

R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255;

So 50% transparent blue will be: 0x80000080. This will not be "dark" - just 50% transparent. Values are 0 == black, 255 == solid or full red, green or blue.

EVAS_COLORSPACE_YCBCR422P601_PL:

This is a pointer-list indirected set of YUV (YCbCr) pixel data. This means that the data returned or set is not actual pixel data, but pointers TO lines of pixel data. The list of pointers will first be N rows of pointers to the Y plane - pointing to the first pixel at the start of each row in the Y plane. N is the height of the image data in pixels. Each pixel in the Y, U and V planes is 1 byte exactly, packed. The next N / 2 pointers will point to rows in the U plane, and the next N / 2 pointers will point to the V plane rows. U and V planes are half the horizontal and vertical resolution of the Y plane.

Row order is top to bottom and row pixels are stored left to right.

There is a limitation that these images MUST be a multiple of 2 pixels in size horizontally or vertically. This is due to the U and V planes being half resolution. Also note that this assumes the itu601 YUV colorspace specification. This is defined for standard television and mpeg streams. HDTV may use the itu709 specification.

Values are 0 to 255, indicating full or no signal in that plane respectively.

EVAS_COLORSPACE_YCBCR422P709_PL:

Not implemented yet.

EVAS_COLORSPACE_RGB565_A5P:

In the process of being implemented in 1 engine only. This may change.

This is a pointer to image data for 16-bit half-word pixel data in 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue), with the high-byte containing red and the low byte containing blue, per pixel. This data is packed row by row from the top-left to the bottom right.

If the image has an alpha channel enabled there will be an extra alpha plane after the color pixel plane. If not, then this data will not exist and should not be accessed in any way. This plane is a set of pixels with 1 byte per pixel defining the alpha values of all pixels in the image from the top-left to the bottom right of the image, row by row. Even though the values of the alpha pixels can be 0 to 255, only values 0 through to 32 are used, 32 being solid and 0 being transparent.

RGB values can be 0 to 31 for red and blue and 0 to 63 for green, with 0 being black and 31 or 63 being full red, green or blue respectively. This colorspace is also pre-multiplied like EVAS_COLORSPACE_ARGB8888 so:

R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32;


Typedef Documentation

Colorspaces for pixel data supported by Evas.

Colorspaces for pixel data supported by Evas


Enumeration Type Documentation

Colorspaces for pixel data supported by Evas.

Enumerator:
EVAS_COLORSPACE_ARGB8888 

ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time.

EVAS_COLORSPACE_YCBCR422P601_PL 

YCbCr 4:2:2 Planar, ITU.BT-601 specifications.

The data poitned to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows

EVAS_COLORSPACE_YCBCR422P709_PL 

YCbCr 4:2:2 Planar, ITU.BT-709 specifications.

The data poitned to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows

EVAS_COLORSPACE_RGB565_A5P 

16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte

EVAS_COLORSPACE_GRY8 

8bit grayscale


Function Documentation

EAPI Evas_Object* evas_object_image_add ( Evas e  ) 

Creates a new image object on the given evas.

Parameters:
e The given evas.
Returns:
The created image object.

Referenced by evas_object_image_filled_add().

EAPI Eina_Bool evas_object_image_alpha_get ( const Evas_Object obj  ) 

Retrieves the alpha channel setting of the given image object.

Parameters:
obj The given image object.
Returns:
Whether the alpha channel data is being used.

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

See evas_object_image_alpha_set for more details.

EAPI void evas_object_image_alpha_set ( Evas_Object obj,
Eina_Bool  has_alpha 
)

Enable or disable alpha channel of the given image object.

This function sets a flag on an image object indicating whether or not to use alpha channel data. A value of 1 indicates to use alpha channel data, and 0 indicates to ignore any alpha channel data. Note that this has nothing to do with an object's color as manipulated by evas_object_color_set().

Parameters:
obj The given image object.
has_alpha Whether to use alpha channel data or not.

References evas_object_image_data_update_add().

EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get ( const Evas_Object obj  ) 

Retrieves if the center of the given image object is to be drawn or not.

See evas_object_image_fill_set for more details.

Parameters:
obj The given image object.
Returns:
Fill mode of the center.
EAPI void evas_object_image_border_center_fill_set ( Evas_Object obj,
Evas_Border_Fill_Mode  fill 
)

Sets if the center part of the given image object (not the border) should be drawn.

When rendering, the image may be scaled to fit the size of the image object. This function sets if the center part of the scaled image is to be drawn or left completely blank, or forced to be solid. Very useful for frames and decorations.

Parameters:
obj The given image object.
fill Fill mode of the middle.
EAPI void evas_object_image_border_get ( const Evas_Object obj,
int *  l,
int *  r,
int *  t,
int *  b 
)

Retrieves how much of each border of the given image object is not to be scaled.

See evas_object_image_border_set for more details.

Parameters:
obj The given image object.
l Location to store the left border width in, or NULL.
r Location to store the right border width in, or NULL.
t Location to store the top border width in, or NULL.
b Location to store the bottom border width in, or NULL.
EAPI double evas_object_image_border_scale_get ( const Evas_Object obj  ) 

Retrieves the border scale factor.

See evas_object_image_border_scale_set()

Parameters:
obj The given image object.
Returns:
The scale factor
EAPI void evas_object_image_border_scale_set ( Evas_Object obj,
double  scale 
)

Sets a scale factor (multiplier) for the borders of an image.

Parameters:
obj The given image object.
scale The scale factor (default is 1.0 - i.e. no scale)
EAPI void evas_object_image_border_set ( Evas_Object obj,
int  l,
int  r,
int  t,
int  b 
)

Sets how much of each border of the given image object is not to be scaled.

When rendering, the image may be scaled to fit the size of the image object. This function sets what area around the border of the image is not to be scaled. This sort of function is useful for widget theming, where, for example, buttons may be of varying sizes, but the border size must remain constant.

The units used for l, r, t and b are output units.

Parameters:
obj The given image object.
l Distance of the left border that is not to be stretched.
r Distance of the right border that is not to be stretched.
t Distance of the top border that is not to be stretched.
b Distance of the bottom border that is not to be stretched.
EAPI Evas_Colorspace evas_object_image_colorspace_get ( const Evas_Object obj  ) 

Get the colorspace of a given image of the canvas.

Parameters:
obj The given image object pointer.
Returns:
The colorspace of the image.

This function returns the colorspace of given canvas image.

References EVAS_COLORSPACE_ARGB8888.

EAPI void evas_object_image_colorspace_set ( Evas_Object obj,
Evas_Colorspace  cspace 
)

Set the colorspace of a given image of the canvas.

Parameters:
obj The given image object pointer.
cspace The new color space.

This function sets the colorspace of given canvas image.

EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get ( const Evas_Object obj  ) 

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

Parameters:
obj The given canvas pointer.

This function returns the content hint value of the given image of the canvas.

EAPI void evas_object_image_content_hint_set ( Evas_Object obj,
Evas_Image_Content_Hint  hint 
)

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

Parameters:
obj The given canvas pointer.
hint The content hint value.

This function sets the content hint value of the given image of the canvas.

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

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.

Referenced by evas_object_image_alpha_set().

EAPI void evas_object_image_file_get ( const Evas_Object obj,
const char **  file,
const char **  key 
)

Retrieves the filename and key of the given image object.

Parameters:
obj The given image object.
file Location to store the image filename, or NULL.
key Location to store the image key, or NULL.
EAPI void evas_object_image_file_set ( Evas_Object obj,
const char *  file,
const char *  key 
)

Sets the filename and key of the given image object.

If the file supports multiple data stored in it as eet, you can specify the key to be used as the index of the image in this file.

Parameters:
obj The given image object.
file The image filename.
key The image key in file, or NULL.

References EVAS_COLORSPACE_ARGB8888, EVAS_LOAD_ERROR_GENERIC, and EVAS_LOAD_ERROR_NONE.

EAPI void evas_object_image_fill_get ( const Evas_Object obj,
Evas_Coord *  x,
Evas_Coord *  y,
Evas_Coord *  w,
Evas_Coord *  h 
)

Retrieves the dimensions of the rectangle of the given image object that the image will be drawn to.

See evas_object_image_fill_set for more details.

Parameters:
obj The given image object.
x Location to store the X coordinate for the top left corner of the image in, or NULL.
y Location to store the Y coordinate for the top left corner of the image in, or NULL.
w Location to store the width of the image in, or NULL.
h Location to store the height of the image in, or NULL.
EAPI void evas_object_image_fill_set ( Evas_Object obj,
Evas_Coord  x,
Evas_Coord  y,
Evas_Coord  w,
Evas_Coord  h 
)

Sets the rectangle of the given image object that the image will be drawn to.

Note that the image will be tiled around this one rectangle. To have only one copy of the image drawn, x and y must be 0 and w and h need to be the width and height of the image object respectively.

The default values for the fill parameters is x = 0, y = 0, w = 32 and h = 32.

Parameters:
obj The given image object.
x The X coordinate for the top left corner of the image.
y The Y coordinate for the top left corner of the image.
w The width of the image.
h The height of the image.

Referenced by evas_object_image_filled_set().

EAPI Evas_Fill_Spread evas_object_image_fill_spread_get ( const Evas_Object obj  ) 

Retrieves the spread (tiling mode) for the given image object's fill.

Parameters:
obj The given evas image object.
Returns:
The current spread mode of the image object.

References EVAS_TEXTURE_REPEAT.

EAPI void evas_object_image_fill_spread_set ( Evas_Object obj,
Evas_Fill_Spread  spread 
)

Sets the tiling mode for the given evas image object's fill.

Parameters:
obj The given evas image object.
spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT, EVAS_TEXTURE_RESTRICT, or EVAS_TEXTURE_PAD.
EAPI Evas_Object* evas_object_image_filled_add ( Evas e  ) 

Creates a new image object that automatically scales on the given evas.

This is a helper around evas_object_image_add() and evas_object_image_filled_set(), it will track object resizes and apply evas_object_image_fill_set() with the new geometry.

See also:
evas_object_image_add()
evas_object_image_filled_set()
evas_object_image_fill_set()

References evas_object_image_add(), and evas_object_image_filled_set().

EAPI Eina_Bool evas_object_image_filled_get ( const Evas_Object obj  ) 

Retrieves if image fill property is tracking object size.

Parameters:
obj The given image object.
Returns:
1 if it is tracking, 0 if not and evas_object_fill_set() must be called manually.
EAPI void evas_object_image_filled_set ( Evas_Object obj,
Eina_Bool  setting 
)

Sets if image fill property should track object size.

If set to true, then every evas_object_resize() will automatically trigger call to evas_object_image_fill_set() with the new size so image will fill the whole object area.

Parameters:
obj The given image object.
setting whether to follow object size.
See also:
evas_object_image_filled_add()
evas_object_image_fill_set()

References EVAS_CALLBACK_RESIZE, evas_object_event_callback_add(), evas_object_event_callback_del(), evas_object_geometry_get(), and evas_object_image_fill_set().

Referenced by evas_object_image_filled_add().

EAPI double evas_object_image_load_dpi_get ( const Evas_Object obj  ) 

Get the dpi resolution of a loaded image of the canvas.

Parameters:
obj The given canvas pointer.
Returns:
The dpi resolution of the given canvas image.

This function returns the dpi resolution of given canvas image.

EAPI void evas_object_image_load_dpi_set ( Evas_Object obj,
double  dpi 
)

Set the dpi resolution of a loaded image of the canvas.

Parameters:
obj The given canvas pointer.
dpi The new dpi resolution.

This function set the dpi resolution of a given loaded canvas image.

EAPI Evas_Load_Error evas_object_image_load_error_get ( const Evas_Object obj  ) 

Retrieves a number representing any error that occurred during the last load of the given image object.

Parameters:
obj The given image object.
Returns:
A value giving the last error that occurred. It should be one of the EVAS_LOAD_ERROR_* values. EVAS_LOAD_ERROR_NONE is returned if there was no error.
EAPI int evas_object_image_load_scale_down_get ( const Evas_Object obj  ) 

Get the scale down value of given image of the canvas.

Parameters:
obj The given image object pointer.

This function returns the scale down value of a given canvas image.

EAPI void evas_object_image_load_scale_down_set ( Evas_Object obj,
int  scale_down 
)

Set the scale down of a loaded image of the canvas.

Parameters:
obj The given canvas pointer.
scale_down The scale to down value.

This function sets the scale down of a given canvas image.

EAPI void evas_object_image_load_size_get ( const Evas_Object obj,
int *  w,
int *  h 
)

Get the size of a loaded image of the canvas.

Parameters:
obj The given canvas object.
w The width of the canvas image given.
h The height of the canvas image given.

This function get the size of the given canvas image.

EAPI void evas_object_image_load_size_set ( Evas_Object obj,
int  w,
int  h 
)

Set the size of a loaded image of the canvas.

Parameters:
obj The given canvas object.
w The new width of the canvas image given.
h Th new height of the canvas image given.

This function sets a new size for the given canvas image.

EAPI Evas_Native_Surface* evas_object_image_native_surface_get ( const Evas_Object obj  ) 

Get the native surface of a given image of the canvas.

Parameters:
obj The given canvas pointer.
Returns:
The native surface of the given canvas image.

This function returns the native surface of a given canvas image.

EAPI void evas_object_image_native_surface_set ( Evas_Object obj,
Evas_Native_Surface surf 
)

Set the native surface of a given image of the canvas.

Parameters:
obj The given canvas pointer.
surf The new native surface.

This function sets a native surface of a given canvas image.

EAPI Eina_Bool evas_object_image_pixels_dirty_get ( const Evas_Object obj  ) 

Retrieves whether the given image object is dirty (needs to be redrawn).

Parameters:
obj The given image object.
Returns:
Whether the image is dirty.
EAPI void evas_object_image_pixels_dirty_set ( Evas_Object obj,
Eina_Bool  dirty 
)

Mark whether the given image object is dirty (needs to be redrawn).

Parameters:
obj The given image object.
dirty Whether the image is dirty.
EAPI void evas_object_image_pixels_get_callback_set ( Evas_Object obj,
Evas_Object_Image_Pixels_Get_Cb  func,
void *  data 
)

Set the callback function to get pixels from a canva's image.

Parameters:
obj The given canvas pointer.
func The callback function.
data The data pointer to be passed to func.

This functions sets a function to be the callback function that get pixes from a image of the canvas.

EAPI Eina_Bool evas_object_image_pixels_import ( Evas_Object obj,
Evas_Pixel_Import_Source pixels 
)

Import pixels from given source to a given canvas image object.

Parameters:
obj The given canvas object.
pixels The pixel's source to be imported.

This function imports pixels from a given source to a given canvas image.

References EVAS_PIXEL_FORMAT_ARGB32, and EVAS_PIXEL_FORMAT_YUV420P_601.

EAPI void evas_object_image_preload ( Evas_Object obj,
Eina_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 image data is already loaded, it will callback EVAS_CALLBACK_IMAGE_PRELOADED immediatelly and do nothing else.

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.
EAPI void evas_object_image_reload ( Evas_Object obj  ) 

Reload a image of the canvas.

Parameters:
obj The given image object pointer.

This function reloads a image of the given canvas.

EAPI Eina_Bool evas_object_image_save ( const Evas_Object obj,
const char *  file,
const char *  key,
const char *  flags 
)

Save the given image object to a file.

Note that you should pass the filename extension when saving. If the file supports multiple data stored in it as eet, you can specify the key to be used as the index of the image in this file.

You can specify some flags when saving the image. Currently acceptable flags are quality and compress. Eg.: "quality=100 compress=9"

Parameters:
obj The given image object.
file The filename to be used to save the image.
key The image key in file, or NULL.
flags String containing the flags to be used.

References EVAS_COLORSPACE_ARGB8888.

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

Parameters:
obj The given canvas pointer.

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

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

Parameters:
obj The given canvas pointer.
hint The scale hint value.

This function sets the scale hint value of the given image of the canvas.

EAPI void evas_object_image_size_get ( const Evas_Object obj,
int *  w,
int *  h 
)

Retrieves the size of the given image object.

See evas_object_image_size_set for more details.

Parameters:
obj The given image object.
w Location to store the width of the image in, or NULL.
h Location to store the height of the image in, or NULL.
EAPI void evas_object_image_size_set ( Evas_Object obj,
int  w,
int  h 
)

Sets the size of the given image object.

This function will scale down or crop the image so that it is treated as if it were at the given size. If the size given is smaller than the image, it will be cropped. If the size given is larger, then the image will be treated as if it were in the upper left hand corner of a larger image that is otherwise transparent.

Parameters:
obj The given image object.
w The new width of the image.
h The new height of the image.
EAPI Eina_Bool evas_object_image_smooth_scale_get ( const Evas_Object obj  ) 

Retrieves whether the given image object is using use a high-quality image scaling algorithm.

See evas_object_image_smooth_scale_set for more details.

Parameters:
obj The given image object.
Returns:
Whether smooth scale is being used.
EAPI void evas_object_image_smooth_scale_set ( Evas_Object obj,
Eina_Bool  smooth_scale 
)

Sets whether to use of high-quality image scaling algorithm of the given image object.

When enabled, a higher quality image scaling algorithm is used when scaling images to sizes other than the source image. This gives better results but is more computationally expensive.

Parameters:
obj The given image object.
smooth_scale Whether to use smooth scale or not.
EAPI 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 units between the start of a row and the start of the next row.

Parameters:
obj The given image object.
Returns:
The stride of the image.