Package evas :: Module c_evas :: Class Gradient
[hide private]
[frames] | no frames]

Class Gradient

object --+    
         |    
    Object --+
             |
            Gradient

Rectangular area with gradient filling

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
 
alpha_stop_add(...)
Adds an alpha stop to the given evas gradient object.
int
angle_get(...)
Retrieves the angle at which the given evas gradient object sits rel to its intrinsic orientation.
 
angle_set(...)
Sets the angle at which the given evas gradient sits, relative to whatever intrinsic orientation of the grad type.
 
clear(...)
Deletes all stops set or any set data.
 
color_stop_add(...)
Adds a color stop to the given evas gradient object.
int
direction_get(...)
 
direction_set(...)
Sets the direction of the given evas gradient object's spectrum.
int
fill_angle_get(...)
 
fill_angle_set(...)
Sets the angle at which the given evas gradient object's fill sits clockwise from vertical.
list of int
fill_get(...)
 
fill_set(...)
Sets the rectangle on the gradient object that the gradient will be drawn to.
int
fill_spread_get(...)
Retrieves the spread (tiling mode) for fill.
 
fill_spread_set(...)
Sets the tiling mode for the given evas gradient object's fill.
tuple of str
gradient_type_get(...)
Sets the geometric type displayed.
 
gradient_type_set(...)
Set a gradient's geometric type.
float
offset_get(...)
 
offset_set(...)
Sets the offset of the given evas gradient object's spectrum.

Inherited from Object: __repr__, __str__, clipees_get, evas_get, name_get, name_set, on_changed_size_hints_add, on_changed_size_hints_del, on_del_add, on_del_del, parent_get, size_hint_align_get, size_hint_align_set, size_hint_aspect_get, size_hint_aspect_set, size_hint_max_get, size_hint_max_set, size_hint_min_get, size_hint_min_set, size_hint_padding_get, size_hint_padding_set, size_hint_request_get, size_hint_request_set, size_hint_weight_get, size_hint_weight_set, type_get

Inherited from Object (private): _set_common_params, _set_evas

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

    State manipulation

Inherited from Object: clip_get, clip_set, clip_unset, color_get, color_set, delete, hide, is_deleted, show, visible_get, visible_set

    Positioning

Inherited from Object: bottom_left_get, bottom_left_set, bottom_right_get, bottom_right_set, center_get, center_set, geometry_get, geometry_set, move, move_relative, pos_get, pos_set, resize, size_get, size_set, top_left_get, top_left_set, top_right_get, top_right_set

    Layer & Stack manipulation

Inherited from Object: above_get, below_get, bottom_get, layer_get, layer_set, lower, raise_, stack_above, stack_below, top_get

    Event processing control

Inherited from Object: focus_get, focus_set, pass_events_get, pass_events_set, propagate_events_get, propagate_events_set, repeat_events_get, repeat_events_set

    Event callbacks

Inherited from Object: event_callback_add, event_callback_del, on_focus_in_add, on_focus_in_del, on_focus_out_add, on_focus_out_del, on_free_add, on_free_del, on_hide_add, on_hide_del, on_hold_add, on_hold_del, on_key_down_add, on_key_down_del, on_key_up_add, on_key_up_del, on_mouse_down_add, on_mouse_down_del, on_mouse_in_add, on_mouse_in_del, on_mouse_move_add, on_mouse_move_del, on_mouse_out_add, on_mouse_out_del, on_mouse_up_add, on_mouse_up_del, on_mouse_wheel_add, on_mouse_wheel_del, on_move_add, on_move_del, on_resize_add, on_resize_del, on_restack_add, on_restack_del, on_show_add, on_show_del

    Often unused

Inherited from Object: anti_alias_get, anti_alias_set, color_interpolation_get, color_interpolation_set, pointer_mode_get, pointer_mode_set, render_op_get, render_op_set

Instance Variables [hide private]

Inherited from Object: clipees, data, evas, name, parent, rect, type

    State manipulation

Inherited from Object: clip, color, visible

    Positioning

Inherited from Object: bottom_left, bottom_right, center, geometry, pos, size, top_left, top_right

    Layer & Stack manipulation

Inherited from Object: above, below, layer

    Event processing control

Inherited from Object: focus, pass_events, propagate_events, repeat_events

    Often unused

Inherited from Object: anti_alias, color_interpolation, pointer_mode, render_op

Properties [hide private]
  angle
  direction
  fill
  fill_angle
  fill_spread
  gradient_type
  offset

Inherited from Object: size_hint_align, size_hint_aspect, size_hint_max, size_hint_min, size_hint_padding, size_hint_request, size_hint_weight

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

alpha_stop_add(...)

 

Adds an alpha stop to the given evas gradient object.

Alphas are added from the top downwards.

angle_set(...)

 

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.

color_stop_add(...)

 

Adds a color stop to the given evas gradient object.

Notes:
  • Colors are added from the top downwards.
  • Colors are in pre-multipied format.

fill_set(...)

 

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 = 1 and h = 1.

fill_spread_set(...)

 

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

value can be:

  • EVAS_TEXTURE_REFLECT: tiling reflects.
  • EVAS_TEXTURE_REPEAT: tiling repeats.
  • EVAS_TEXTURE_RESTRICT: tiling clamps - range offset ignored.
  • EVAS_TEXTURE_RESTRICT_REFLECT: tiling clamps and any range offset reflects.
  • EVAS_TEXTURE_RESTRICT_REPEAT: tiling clamps and any range offset repeats.
  • EVAS_TEXTURE_PAD: tiling extends with end values.

gradient_type_get(...)

 

Sets the geometric type displayed.

Returns: tuple of str
(type, instance_params)