General Utilities

Some functions that are handy but are not specific of canvas or objects. More...

Functions

EAPI const char * evas_load_error_str (int error)
 Converts the given error code into a string describing it in english.
EAPI void evas_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b)
 Convert a given color from HSV to RGB format.
EAPI void evas_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v)
 Convert a given color from RGB to HSV format.
EAPI void evas_color_argb_premul (int a, int *r, int *g, int *b)
 Pre-multiplies a rgb triplet by an alpha factor.
EAPI void evas_color_argb_unpremul (int a, int *r, int *g, int *b)
 Undo pre-multiplication of a rgb triplet by an alpha factor.
EAPI void evas_data_argb_premul (unsigned int *data, unsigned int len)
 Pre-multiplies data by an alpha factor.
EAPI void evas_data_argb_unpremul (unsigned int *data, unsigned int len)
 Undo pre-multiplication data by an alpha factor.
EAPI int evas_string_char_next_get (const char *str, int pos, int *decoded)
 To be documented.
EAPI int evas_string_char_prev_get (const char *str, int pos, int *decoded)
 To be documented.
EAPI int evas_string_char_len_get (const char *str)
 Get the length in characters of the string.
EAPI void evas_transform_identity_set (Evas_Transform *t)
 To be documented.
EAPI void evas_transform_rotate (double angle, Evas_Transform *t)
 To be documented.
EAPI void evas_transform_translate (float dx, float dy, Evas_Transform *t)
 To be documented.
EAPI void evas_transform_scale (float sx, float sy, Evas_Transform *t)
 To be documented.
EAPI void evas_transform_shear (float sh, float sv, Evas_Transform *t)
 To be documented.
EAPI void evas_transform_compose (Evas_Transform *l, Evas_Transform *t)
 To be documented.

Detailed Description

Some functions that are handy but are not specific of canvas or objects.


Function Documentation

EAPI void evas_color_argb_premul ( int  a,
int *  r,
int *  g,
int *  b 
)

Pre-multiplies a rgb triplet by an alpha factor.

Parameters:
a The alpha factor.
r The Red component of the color.
g The Green component of the color.
b The Blue component of the color.

This function pre-multiplies a given rbg triplet by an alpha factor. Alpha factor is used to define transparency.

EAPI void evas_color_argb_unpremul ( int  a,
int *  r,
int *  g,
int *  b 
)

Undo pre-multiplication of a rgb triplet by an alpha factor.

Parameters:
a The alpha factor.
r The Red component of the color.
g The Green component of the color.
b The Blue component of the color.

This function undoes pre-multiplication a given rbg triplet by an alpha factor. Alpha factor is used to define transparency.

See also:
evas_color_argb_premul().
EAPI void evas_color_hsv_to_rgb ( float  h,
float  s,
float  v,
int *  r,
int *  g,
int *  b 
)

Convert a given color from HSV to RGB format.

Parameters:
h The Hue component of the color.
s The Saturation component of the color.
v The Value component of the color.
r The Red component of the color.
g The Green component of the color.
b The Blue component of the color.

This function converts a given color in HSV color format to RGB color format.

EAPI void evas_color_rgb_to_hsv ( int  r,
int  g,
int  b,
float *  h,
float *  s,
float *  v 
)

Convert a given color from RGB to HSV format.

Parameters:
r The Red component of the color.
g The Green component of the color.
b The Blue component of the color.
h The Hue component of the color.
s The Saturation component of the color.
v The Value component of the color.

This function converts a given color in RGB color format to HSV color format.

EAPI void evas_data_argb_premul ( unsigned int *  data,
unsigned int  len 
)

Pre-multiplies data by an alpha factor.

Parameters:
data The data value.
len The lenght value.

This function pre-multiplies a given data by an alpha factor. Alpha factor is used to define transparency.

EAPI void evas_data_argb_unpremul ( unsigned int *  data,
unsigned int  len 
)

Undo pre-multiplication data by an alpha factor.

Parameters:
data The data value.
len The lenght value.

This function undoes pre-multiplication of a given data by an alpha factor. Alpha factor is used to define transparency.

EAPI const char* evas_load_error_str ( int  error  ) 

Converts the given error code into a string describing it in english.

Parameters:
error the error code.
Returns:
Always return a valid string. If given error is not supported "Unknown error" is returned.

References EVAS_LOAD_ERROR_CORRUPT_FILE, EVAS_LOAD_ERROR_DOES_NOT_EXIST, EVAS_LOAD_ERROR_GENERIC, EVAS_LOAD_ERROR_NONE, EVAS_LOAD_ERROR_PERMISSION_DENIED, EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED, and EVAS_LOAD_ERROR_UNKNOWN_FORMAT.

EAPI int evas_string_char_len_get ( const char *  str  ) 

Get the length in characters of the string.

Parameters:
str The string to get the length of.
Returns:
The length in characters (not bytes)
EAPI int evas_string_char_next_get ( const char *  str,
int  pos,
int *  decoded 
)

To be documented.

FIXME: To be fixed.

EAPI int evas_string_char_prev_get ( const char *  str,
int  pos,
int *  decoded 
)

To be documented.

FIXME: To be fixed.

EAPI void evas_transform_compose ( Evas_Transform l,
Evas_Transform t 
)

To be documented.

FIXME: To be fixed.

EAPI void evas_transform_identity_set ( Evas_Transform t  ) 

To be documented.

FIXME: To be fixed.

EAPI void evas_transform_rotate ( double  angle,
Evas_Transform t 
)

To be documented.

FIXME: To be fixed.

EAPI void evas_transform_scale ( float  sx,
float  sy,
Evas_Transform t 
)

To be documented.

FIXME: To be fixed.

EAPI void evas_transform_shear ( float  sh,
float  sv,
Evas_Transform t 
)

To be documented.

FIXME: To be fixed.

EAPI void evas_transform_translate ( float  dx,
float  dy,
Evas_Transform t 
)

To be documented.

FIXME: To be fixed.