clutter.Alpha
class clutter.Alpha( |
clutter.Alpha is a class for calculating an integer value between 0 and clutter.ALPHA_MAX_ALPHA as a function of time. You should provide a clutter.Timeline and bind it to the clutter.Alpha object; you should also provide a function returning the alpha value depending on the position inside the timeline; this function will be executed each time a new frame in the clutter.Timeline is reached. Since the alpha function is controlled by the timeline instance, you can pause or stop the clutter.Alpha from calling the alpha function by controlling the clutter.Timeline object.
clutter.Alpha is used to "drive" a clutter.Behaviour instance.
__init__(timeline
=None, func
=None, data
=None)
Returns : | a clutter.Alpha |
Creates a new clutter.Alpha instance. You should use the newly created clutter.Alpha instance inside a clutter.Behaviour object.
def get_alpha()
Returns : | a integer value between 0 and clutter.ALPHA_MAX_ALPHA |
Queries the current alpha value.
def set_func(func
, data
)
| a callable |
| data to pass to the callable |
Sets the function used to compute the alpha value at each frame of the clutter.Timeline bound to the alpha instance.
def set_timeline(timeline
)
| a clutter.Timeline |
Binds a clutter.Alpha to a clutter.Timeline
.
def get_timeline()
Returns : | a clutter.Timeline |
Retrieves the clutter.Timeline
bound to the alpha instance.
|