Evas_Object_Gradient_Group

Langue: en

Autres versions - même langue

Version: 377442 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

Sommaire

NAME

Gradient Object Functions -

Functions that work on evas gradient objects.

Functions


EAPI Evas_Object * evas_object_gradient_add (Evas *e)
Adds a gradient object to the given evas.
EAPI void evas_object_gradient_color_stop_add (Evas_Object *obj, int r, int g, int b, int a, int delta)
Adds a color stop to the given evas gradient object.
EAPI void evas_object_gradient_alpha_stop_add (Evas_Object *obj, int a, int delta)
Adds an alpha stop to the given evas gradient object.
EAPI void evas_object_gradient_clear (Evas_Object *obj)
Deletes all stops set for the given evas gradient object or any set data.
EAPI void evas_object_gradient_color_data_set (Evas_Object *obj, void *data, int len, Eina_Bool has_alpha)
Sets color data for the given evas gradient object.
EAPI void evas_object_gradient_alpha_data_set (Evas_Object *obj, void *data, int len)
Sets alpha data for the given evas gradient object.
EAPI void evas_object_gradient_fill_set (Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
Sets the rectangle on the gradient object that the gradient will be drawn to.
EAPI void evas_object_gradient_fill_get (const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
Retrieves the dimensions of the rectangle on the gradient object that the gradient will use as its fill rect.
EAPI void evas_object_gradient_fill_angle_set (Evas_Object *obj, Evas_Angle angle)
Sets the angle at which the given evas gradient object's fill sits clockwise from vertical.
EAPI Evas_Angle evas_object_gradient_fill_angle_get (const Evas_Object *obj)
Retrieves the angle at which the given evas gradient object's fill sits clockwise from the vertical.
EAPI void evas_object_gradient_fill_spread_set (Evas_Object *obj, int spread)
Sets the tiling mode for the given evas gradient object's fill.
EAPI int evas_object_gradient_fill_spread_get (const Evas_Object *obj)
Retrieves the spread (tiling mode) for the given gradient object's fill.
EAPI void evas_object_gradient_angle_set (Evas_Object *obj, Evas_Angle angle)
Sets the angle at which the given evas gradient sits, relative to whatever intrinsic orientation of the grad type.
EAPI Evas_Angle evas_object_gradient_angle_get (const Evas_Object *obj)
Retrieves the angle at which the given evas gradient object sits rel to its intrinsic orientation.
EAPI void evas_object_gradient_offset_set (Evas_Object *obj, float offset)
Sets the offset of the given evas gradient object's spectrum.
EAPI float evas_object_gradient_offset_get (const Evas_Object *obj)
Retrieves the spectrum's offset.
EAPI void evas_object_gradient_direction_set (Evas_Object *obj, int direction)
Sets the direction of the given evas gradient object's spectrum.
EAPI int evas_object_gradient_direction_get (const Evas_Object *obj)
Retrieves the evas gradient object's spectrum direction.
EAPI void evas_object_gradient_type_set (Evas_Object *obj, const char *name, const char *params)
Sets the geometric type displayed by the given gradient object.
EAPI void evas_object_gradient_type_get (const Evas_Object *obj, char **name, char **params)
Retrieves the type name and params of the given gradient object.

Detailed Description

Functions that work on evas gradient objects.

Function Documentation

EAPI Evas_Object* evas_object_gradient_add (Evas * e)

Adds a gradient object to the given evas. Parameters:

e The given evas.

Returns:

A new evas gradient object if successful. Otherwise, NULL.

EAPI void evas_object_gradient_alpha_data_set (Evas_Object * obj, void * data, int len)

Sets alpha data for the given evas gradient object. If alpha data is so set, any existing gradient stops will be cleared, The data is not copied, so if it was allocated, do not free it while it's set.

Parameters:

obj The given evas gradient object.
data The alpha data to be set, in a8 format.
len The length of the data pointer - multiple of the pixel size.

EAPI void evas_object_gradient_alpha_stop_add (Evas_Object * obj, int a, int delta)

Adds an alpha stop to the given evas gradient object. The delta parameter determines the proportion of the gradient object that is to be set to the alpha value.

Alphas are added from the top downwards.

Parameters:

obj The given evas gradient object.
a Alpha value.
delta Proportion of the gradient object that is this alpha.

EAPI Evas_Angle evas_object_gradient_angle_get (const Evas_Object * obj)

Retrieves the angle at which the given evas gradient object sits rel to its intrinsic orientation. Parameters:

obj The given evas gradient object.

Returns:

The current angle if successful. 0.0 otherwise.

EAPI void evas_object_gradient_angle_set (Evas_Object * obj, Evas_Angle angle)

Sets the angle at which the given evas gradient sits, relative to whatever intrinsic orientation of the grad type. Used mostly by 'linear' kinds of gradients.

Parameters:

obj The given evas gradient object.
angle Angle in degrees. Can be negative.

EAPI void evas_object_gradient_clear (Evas_Object * obj)

Deletes all stops set for the given evas gradient object or any set data. Parameters:

obj The given evas gradient object.

EAPI void evas_object_gradient_color_data_set (Evas_Object * obj, void * data, int len, Eina_Bool has_alpha)

Sets color data for the given evas gradient object. If data is so set, any existing gradient stops will be deleted, The data is not copied, so if it was allocated, do not free it while it's set.

Parameters:

obj The given evas gradient object.
data The color data to be set. Should be in argb32 pixel format.
len The length of the data pointer - multiple of the pixel size.
has_alpha A flag indicating if the data has alpha or not.

EAPI void evas_object_gradient_color_stop_add (Evas_Object * obj, int r, int g, int b, int a, int delta)

Adds a color stop to the given evas gradient object. The delta parameter determines the proportion of the gradient object that is to be set to the color. For instance, if red is added with delta set to 2, and green is added with delta set to 1, two-thirds will be red or reddish and one-third will be green or greenish.

Colors are added from the top downwards.

Parameters:

obj The given evas gradient object.
r Red component of the given color.
g Green component of the given color.
b Blue component of the given color.
a Alpha component of the given color.
delta Proportion of the gradient object that is this color.

EAPI int evas_object_gradient_direction_get (const Evas_Object * obj)

Retrieves the evas gradient object's spectrum direction. Parameters:

obj The given evas gradient object.

Returns:

The current gradient direction if successful. 1 otherwise.

EAPI void evas_object_gradient_direction_set (Evas_Object * obj, int direction)

Sets the direction of the given evas gradient object's spectrum. Parameters:

obj The given evas gradient object.
direction Values are either 1 (the default) or -1.

EAPI Evas_Angle evas_object_gradient_fill_angle_get (const Evas_Object * obj)

Retrieves the angle at which the given evas gradient object's fill sits clockwise from the vertical. Parameters:

obj The given evas gradient object.

Returns:

The current angle if successful. 0.0 otherwise.

EAPI void evas_object_gradient_fill_angle_set (Evas_Object * obj, Evas_Angle angle)

Sets the angle at which the given evas gradient object's fill sits clockwise from vertical. Parameters:

obj The given evas gradient object.
angle Angle in degrees. Can be negative.

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

Retrieves the dimensions of the rectangle on the gradient object that the gradient will use as its fill rect. See evas_object_gradient_fill_set for more details.

Parameters:

obj The given evas gradient object.
x Pointer to an Evas_Coord to store the X coordinate in.
y Pointer to an Evas_Coord to store the Y coordinate in.
w Pointer to an Evas_Coord to store the width in.
h Pointer to an Evas_Coord to store the height in.

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

Sets the rectangle on the gradient object that the gradient will be drawn to. Note that the gradient may be tiled around this one rectangle, according to its spread value - restrict, repeat, or reflect. To have only one 'cycle' of the gradient drawn, the spread value must be set to restrict, or x and y must be 0 and w and h need to be the width and height of the gradient object respectively.

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

Parameters:

obj The given evas gradient object.
x The X coordinate for the top left corner of the rect.
y The Y coordinate for the top left corner of the rect.
w The width of the rect.
h The height of the rect.

EAPI int evas_object_gradient_fill_spread_get (const Evas_Object * obj)

Retrieves the spread (tiling mode) for the given gradient object's fill. Parameters:

obj The given evas gradient object.

Returns:

The current spread mode of the gradient object.

References EVAS_TEXTURE_REFLECT.

EAPI void evas_object_gradient_fill_spread_set (Evas_Object * obj, int spread)

Sets the tiling mode for the given evas gradient object's fill. Parameters:

obj The given evas gradient object.
spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT, EVAS_TEXTURE_RESTRICT, EVAS_TEXTURE_RESTRICT_REFLECT, EVAS_TEXTURE_RESTRICT_REPEAT, or EVAS_TEXTURE_PAD.

EAPI float evas_object_gradient_offset_get (const Evas_Object * obj)

Retrieves the spectrum's offset. Parameters:

obj The given evas gradient object.

Returns:

The current gradient offset if successful. 0.0 otherwise.

EAPI void evas_object_gradient_offset_set (Evas_Object * obj, float offset)

Sets the offset of the given evas gradient object's spectrum. Parameters:

obj The given evas gradient object.
offset Values can be negative.

EAPI void evas_object_gradient_type_get (const Evas_Object * obj, char ** name, char ** params)

Retrieves the type name and params of the given gradient object. Parameters:

obj The given gradient object.
name Pointer to a character pointer to store the pointer to the type name in.
params Pointer to a character pointer to store the pointer to the type params string in.

EAPI void evas_object_gradient_type_set (Evas_Object * obj, const char * name, const char * params)

Sets the geometric type displayed by the given gradient object. Parameters:

obj The given gradient object.
name Name of the geometric type that the gradient is to be drawn as.
params List of allowable params that the given gradient type allows. Can be NULL.

Author

Generated automatically by Doxygen for Evas from the source code.