---
name: "Clutter::Behaviour::Path"
section: "3pm"
platform: "linux"
package: "libclutter-perl"
version: "1.002-1"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/Clutter::Behaviour::Path"
---

# Clutter::Behaviour::Path(3pm)

A behaviour for moving actors along a Clutter::Path

## NAME

Clutter::Behaviour::Path - A behaviour for moving actors along a Clutter::Path

## SYNOPSIS

```
    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);
```

## DESCRIPTION

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)

  ## SEE ALSO

Clutter::Path, Clutter::Behaviour, Clutter::Alpha

## COPYRIGHT

Copyright (C) 2006, 2007, 2008  OpenedHand Ltd

Copyright (C) 2009  Intel Corporation

This module is free software; you can redistribute it and/or modify it under the terms of either:

- •

  the GNU Lesser General Public Library version 2.1; or

- •

  the Artistic License, version 2.0.

See Clutter for the full copyright notice.
