Next: ClutterBehaviourRotate, Previous: ClutterBehaviourOpacity, Up: Top
A behaviour interpolating position along a path
<clutter-behaviour-path> interpolates actors along a defined path.
A path is a set of <clutter-knots> object given when creating a new
<clutter-behaviour-path> instance. Knots can be also added to the path
using clutter-behaviour-path-append-knot. The whole path can be cleared
using clutter-behaviour-path-clear. Each time the behaviour reaches a
knot in the path, the "knot-reached" signal is emitted.
This first knot in the path is reached with the lower bound value provided by
the <clutter-alpha> objectused by the behaviour; the last knot in the
path is reached with the upper bound value provided by the
<clutter-alpha> object used by the behaviour.
If the alpha function is a periodic function, i.e. it returns to
0 after reaching ‘CLUTTER_ALPHA_MAX_ALPHA’, then the actors will walk
the path back to the starting <clutter-knot>.
|
<clutter-behaviour-path> is available since Clutter 0.2
Derives from
<clutter-scriptable>,<clutter-behaviour>.This class defines the following slots:
knot- Can be used to append a knot to the path
<clutter-knot>)This signal is emitted each time a node defined inside the path is reached.
Since 0.2
<clutter-alpha>) (knots <clutter-knot>) (n_knots unsigned-int) (ret <clutter-behaviour>)Creates a new path behaviour. You can use this behaviour to drive actors along the nodes of a path, described by the knots.
- alpha
- a
<clutter-alpha>, or ‘#f’- knots
- a list of
<clutter-knots>, or ‘#f’ for an empty path- n-knots
- the number of nodes in the path
- ret
- a
<clutter-behaviour>Since 0.2
<clutter-behaviour-path>) (ret gslist-of)Returns a copy of the list of knots contained by pathb
- pathb
- a
<clutter-behvaiour-path>- ret
- a
<gs-list>of the paths knots.Since 0.2
<clutter-behaviour-path>) (knot <clutter-knot>)Appends a
<clutter-knot>to the path
- pathb
- a
<clutter-behvaiour-path>- knot
- a
<clutter-knot>to append.Since 0.2
<clutter-behaviour-path>) (offset unsigned-int) (knot <clutter-knot>)Inserts a
<clutter-knot>in the path at specified position. Values greater than total number of knots will append the knot at the end of path.
- pathb
- a
<clutter-behvaiour-path>- offset
- position in path to insert knot.
- knot
- a
<clutter-knot>to append.Since 0.2
<clutter-behaviour-path>) (offset unsigned-int)Removes a
<clutter-knot>in the path at specified offset.
- pathb
- a
<clutter-behvaiour-path>- offset
- position in path to remove knot.
Since 0.2