Next: , Previous: ClutterActor, Up: Top


3 ClutterAlpha

A class for calculating an alpha value as a function of time.

3.1 Overview

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

(The missing figure, alpha-functions

3.2 Usage

— Class: <clutter-alpha>

Derives from <g-initially-unowned>.

This class defines the following slots:

timeline
Timeline
alpha
Alpha value
— Function: clutter-alpha-new   (ret <clutter-alpha>)

Creates a new <clutter-alpha> instance. You must set a function to compute the alpha value using clutter-alpha-set-func and bind a <clutter-timeline> object to the <clutter-alpha> instance using clutter-alpha-set-timeline.

You should use the newly created <clutter-alpha> instance inside a <clutter-behaviour> object.

ret
the newly created empty <clutter-alpha> instance.

Since 0.2

— Function: clutter-alpha-get-alpha (self <clutter-alpha>)   (ret unsigned-int32)
— Method: get-alpha

Query the current alpha value.

alpha
A <clutter-alpha>
ret
The current alpha value for the alpha

Since 0.2

— Function: clutter-alpha-set-closure (self <clutter-alpha>) (closure <gclosure>)
— Method: set-closure

Sets the <gclosure> used to compute the alpha value at each frame of the <clutter-timeline> bound to alpha.

alpha
A <clutter-alpha>
closure
A <gclosure>

Since 0.8

— Function: clutter-alpha-set-timeline (self <clutter-alpha>) (timeline <clutter-timeline>)
— Method: set-timeline

Binds alpha to timeline.

alpha
A <clutter-alpha>
timeline
A <clutter-timeline>

Since 0.2

— Function: clutter-alpha-get-timeline (self <clutter-alpha>)   (ret <clutter-timeline>)
— Method: get-timeline

Gets the <clutter-timeline> bound to alpha.

alpha
A <clutter-alpha>
ret
a <clutter-timeline> instance

Since 0.2