Table of Contents
A ClutterTimeline can be used to change the position or appearance of an actor over time.
These can be used directly as described in this chapter, or together with an effect or behaviour, as you will see in
the following chapters.
The timeline object emits its new-frame signal for each frame that should be drawn,
for as many frames per second as specified. In your signal handler you can set the actor's properties.
For instance, the actor might be moved and rotated over time, and its color might change while this is happening.
You could even change the properties of several actors to animate the entire stage.
The clutter_timeline_new() constructor function takes a number of frames, and a number
of frames per second, so the entire timeline will have a duration of n_frames / fps.
You might therefore choose the number of frames based on a desired duration, by dividing the duration by the desired frames per second.
You may also use clutter_timeline_set_loop() to cause the timeline to
repeat for ever, or until you call clutter_timeline_stop(). The timeline does not start
until you call clutter_timeline_start().
Remember to unref the timeline when you are finished with it. Unlike actors, this does not have a "floating reference".
You may either do this after your mainloop has finished, or when the timeline has finished, by handling the
timeline's completed signal.