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, Evas_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_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 (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 (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 (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 (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 (Evas_Object *obj) |
Retrieves the evas gradient object's spectrum direction. |
The following example shows how
EAPI Evas_Object* evas_object_gradient_add | ( | Evas * | e | ) |
Adds a gradient object to the given evas.
e | The given evas. |
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.
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.
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 | ( | Evas_Object * | obj | ) |
Retrieves the angle at which the given evas gradient object sits rel to its intrinsic orientation.
obj | The given evas gradient object. |
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.
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.
obj | The given evas gradient object. |
EAPI void evas_object_gradient_color_data_set | ( | Evas_Object * | obj, | |
void * | data, | |||
int | len, | |||
Evas_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.
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.
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 | ( | Evas_Object * | obj | ) |
Retrieves the evas gradient object's spectrum direction.
obj | The given evas gradient object. |
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.
obj | The given evas gradient object. | |
direction | Values are either 1 (the default) or -1. |
EAPI Evas_Angle evas_object_gradient_fill_angle_get | ( | Evas_Object * | obj | ) |
Retrieves the angle at which the given evas gradient object's fill sits clockwise from the vertical.
obj | The given evas gradient object. |
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.
obj | The given evas gradient object. | |
angle | Angle in degrees. Can be negative. |
EAPI int evas_object_gradient_fill_spread_get | ( | Evas_Object * | obj | ) |
Retrieves the spread (tiling mode) for the given gradient object's fill.
obj | The given evas gradient object. |
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.
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 | ( | Evas_Object * | obj | ) |
Retrieves the spectrum's offset.
obj | The given evas gradient object. |
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.
obj | The given evas gradient object. | |
offset | Values can be negative. |