clutter.Alpha

clutter.Alpha

Synopsis

class clutter.Alpha(GObject):
    __init__(timeline=None, func=None, data=None)
def get_alpha()
def set_func(func, data)
def set_timeline(timeline)
def get_timeline()

Ancestry

gobject.GObject
+-- gobject.GInitiallyUnowned
  +-- clutter.Alpha

Description

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.

Constructor

      __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.

Methods

clutter.Alpha.get_alpha

      def get_alpha()

Returns :

a integer value between 0 and clutter.ALPHA_MAX_ALPHA

Queries the current alpha value.

clutter.Alpha.set_func

      def set_func(func, data)

func :

a callable

data :

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.

clutter.Alpha.set_timeline

      def set_timeline(timeline)

timeline :

a clutter.Timeline

Binds a clutter.Alpha to a clutter.Timeline.

clutter.Alpha.get_timeline

      def get_timeline()

Returns :

a clutter.Timeline

Retrieves the clutter.Timeline bound to the alpha instance.

Properties

clutter.Alpha Properties

"timeline"Read-Writea clutter.Timeline instance used as the time source for the alpha function.
"alpha"Read-onlyThe alpha value as computed by the alpha function