Clutter.BehaviourRotate

g Clutter.Behaviour Clutter.Behaviour Clutter.BehaviourRotate Clutter.BehaviourRotate Clutter.Behaviour->Clutter.BehaviourRotate Clutter.Scriptable Clutter.Scriptable Clutter.Scriptable->Clutter.Behaviour GObject.GInterface GObject.GInterface GObject.GInterface->Clutter.Scriptable GObject.Object GObject.Object GObject.Object->Clutter.Behaviour

Subclasses:

None

Methods

Inherited:

Clutter.Behaviour (10), GObject.Object (37), Clutter.Scriptable (4)

Structs:

GObject.ObjectClass (5)

class

new (alpha, axis, direction, angle_start, angle_end)

get_axis ()

get_bounds ()

get_center ()

get_direction ()

set_axis (axis)

set_bounds (angle_start, angle_end)

set_center (x, y, z)

set_direction (direction)

Virtual Methods

Inherited:

Clutter.Behaviour (3), GObject.Object (7), Clutter.Scriptable (4)

Properties

Inherited:

Clutter.Behaviour (1)

Name

Type

Flags

Short Description

angle-end

float

r/w

Final angle

angle-start

float

r/w

Initial angle

axis

Clutter.RotateAxis

r/w

Axis of rotation

center-x

int

r/w

X coordinate of the center of rotation

center-y

int

r/w

Y coordinate of the center of rotation

center-z

int

r/w

Z coordinate of the center of rotation

direction

Clutter.RotateDirection

r/w

Direction of rotation

Signals

Inherited:

Clutter.Behaviour (2), GObject.Object (1)

Fields

Inherited:

Clutter.Behaviour (2), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Clutter.Behaviour

r

Class Details

class Clutter.BehaviourRotate(**kwargs)
Bases:

Clutter.Behaviour

Abstract:

No

Structure:

Clutter.BehaviourRotateClass

The Clutter.BehaviourRotate struct contains only private data and should be accessed using the provided API

New in version 0.4.

Deprecated since version 1.6: Use clutter_actor_animate() instead.

classmethod new(alpha, axis, direction, angle_start, angle_end)
Parameters:
Returns:

the newly created Clutter.BehaviourRotate.

Return type:

Clutter.Behaviour

Creates a new Clutter.BehaviourRotate. This behaviour will rotate actors bound to it on axis, following direction, between angle_start and angle_end. Angles >= 360 degrees will be clamped to the canonical interval <0, 360), if angle_start == angle_end, the behaviour will carry out a single rotation of 360 degrees.

If alpha is not None, the Clutter.Behaviour will take ownership of the Clutter.Alpha instance. In the case when alpha is None, it can be set later with Clutter.Behaviour.set_alpha().

New in version 0.4.

get_axis()
Returns:

the rotation axis

Return type:

Clutter.RotateAxis

Retrieves the Clutter.RotateAxis used by the rotate behaviour.

New in version 0.4.

get_bounds()
Returns:

angle_start:

return value for the initial angle

angle_end:

return value for the final angle

Return type:

(angle_start: float, angle_end: float)

Retrieves the rotation boundaries of the rotate behaviour.

New in version 0.4.

get_center()
Returns:

x:

return location for the X center of rotation

y:

return location for the Y center of rotation

z:

return location for the Z center of rotation

Return type:

(x: int, y: int, z: int)

Retrieves the center of rotation set using Clutter.BehaviourRotate.set_center().

New in version 0.4.

get_direction()
Returns:

the rotation direction

Return type:

Clutter.RotateDirection

Retrieves the Clutter.RotateDirection used by the rotate behaviour.

New in version 0.4.

set_axis(axis)
Parameters:

axis (Clutter.RotateAxis) – a Clutter.RotateAxis

Sets the axis used by the rotate behaviour.

New in version 0.4.

set_bounds(angle_start, angle_end)
Parameters:
  • angle_start (float) – initial angle in degrees, between 0 and 360.

  • angle_end (float) – final angle in degrees, between 0 and 360.

Sets the initial and final angles of a rotation behaviour; angles >= 360 degrees get clamped to the canonical interval <0, 360).

New in version 0.4.

set_center(x, y, z)
Parameters:
  • x (int) – X axis center of rotation

  • y (int) – Y axis center of rotation

  • z (int) – Z axis center of rotation

Sets the center of rotation. The coordinates are relative to the plane normal to the rotation axis set with Clutter.BehaviourRotate.set_axis().

New in version 0.4.

set_direction(direction)
Parameters:

direction (Clutter.RotateDirection) – the rotation direction

Sets the rotation direction used by the rotate behaviour.

New in version 0.4.

Property Details

Clutter.BehaviourRotate.props.angle_end
Name:

angle-end

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The final angle to where the rotation should end.

New in version 0.4.

Clutter.BehaviourRotate.props.angle_start
Name:

angle-start

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The initial angle from whence the rotation should start.

New in version 0.4.

Clutter.BehaviourRotate.props.axis
Name:

axis

Type:

Clutter.RotateAxis

Default Value:

Clutter.RotateAxis.Z_AXIS

Flags:

READABLE, WRITABLE

The axis of rotation.

New in version 0.4.

Clutter.BehaviourRotate.props.center_x
Name:

center-x

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The x center of rotation.

New in version 0.4.

Clutter.BehaviourRotate.props.center_y
Name:

center-y

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The y center of rotation.

New in version 0.4.

Clutter.BehaviourRotate.props.center_z
Name:

center-z

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The z center of rotation.

New in version 0.4.

Clutter.BehaviourRotate.props.direction
Name:

direction

Type:

Clutter.RotateDirection

Default Value:

Clutter.RotateDirection.CW

Flags:

READABLE, WRITABLE

The direction of the rotation.

New in version 0.4.