Clutter::Behaviour::Path(3pm)

Clutter::Behaviour::Path3pm

A behaviour for moving actors along a clutter::path

Usage

    my $path = Clutter::Path->new('M 10,10 C 20,20 20,20 10,30 z');
    my $behaviour = Clutter::Behaviour::Path->new($alpha, $path);
    $behaviour->apply($rectangle);

Overview

Clutter::Behaviour::Path interpolates actors along a defined path.

A path is described by a Clutter::Path object. The path can contain straight line parts and bezier curves. If the path contains 'move-to' nodes then the actors will jump to those coordinates. This can be used make disjoint paths.

When creating a path behaviour in a Clutter::Script, you can specify the path property directly as a string. For example:

    {
      "id"     : "spline-path",
      "type"   : "ClutterBehaviourPath",
      "path"   : "M 50 50 L 100 100",
      "alpha"  : {
        "timeline" : "main-timeline",
        "function" : "ramp
      }
    }

Note: If the alpha function is a periodic function, i.e. it returns to 0 after reaching the maximum alpha value, then the actors will walk the path backwards to the starting node.

Hierarchy

  Glib::Object
  +----Clutter::Behaviour
       +----Clutter::Behaviour::Path

Interfaces

  Glib::Object::_Unregistered::ClutterScriptable

Methods

behaviour = Clutter::Behaviour::Path->new ($alpha=undef, $path=undef)

•

$alpha (Clutter::Alpha or undef)

•

$path (Clutter::Path or undef)

path = $behaviour->get_path

$behaviour->set_path ($path)

•

$path (Clutter::Path or undef)

Properties

'path' (Clutter::Path : readable / writable / private)

The ClutterPath object representing the path to animate along

Signals

knot-reached (Clutter::Behaviour::Path, Glib::UInt)

Releases

2 releases since Debian 5.0 (Lenny); the text changed 1 time.

  1. 5.0
  2. 6.0

From libclutter-perl 1.002-1 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.