Clutter.AlignConstraint

g Clutter.ActorMeta Clutter.ActorMeta Clutter.Constraint Clutter.Constraint Clutter.ActorMeta->Clutter.Constraint Clutter.AlignConstraint Clutter.AlignConstraint Clutter.Constraint->Clutter.AlignConstraint GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.ActorMeta GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

Clutter.ActorMeta (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (source, axis, factor)

get_align_axis ()

get_factor ()

get_source ()

set_align_axis (axis)

set_factor (factor)

set_source (source)

Virtual Methods

Inherited:

Clutter.Constraint (2), Clutter.ActorMeta (1), GObject.Object (7)

Properties

Inherited:

Clutter.ActorMeta (3)

Name

Type

Flags

Short Description

align-axis

Clutter.AlignAxis

r/w/c

The axis to align the position to

factor

float

r/w/c

The alignment factor, between 0.0 and 1.0

source

Clutter.Actor

r/w/c

The source of the alignment

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Clutter.AlignConstraint(**kwargs)
Bases:

Clutter.Constraint

Abstract:

No

Structure:

Clutter.AlignConstraintClass

Clutter.AlignConstraint is an opaque structure whose members cannot be directly accesses

New in version 1.4.

classmethod new(source, axis, factor)
Parameters:
Returns:

the newly created Clutter.AlignConstraint

Return type:

Clutter.Constraint

Creates a new constraint, aligning a Clutter.Actor's position with regards of the size of the actor to source, with the given alignment factor

New in version 1.4.

get_align_axis()
Returns:

the alignment axis

Return type:

Clutter.AlignAxis

Retrieves the value set using Clutter.AlignConstraint.set_align_axis()

New in version 1.4.

get_factor()
Returns:

the alignment factor

Return type:

float

Retrieves the factor set using Clutter.AlignConstraint.set_factor()

New in version 1.4.

get_source()
Returns:

the Clutter.Actor used as the source of the alignment

Return type:

Clutter.Actor

Retrieves the source of the alignment

New in version 1.4.

set_align_axis(axis)
Parameters:

axis (Clutter.AlignAxis) – the axis to which the alignment refers to

Sets the axis to which the alignment refers to

New in version 1.4.

set_factor(factor)
Parameters:

factor (float) – the alignment factor, between 0.0 and 1.0

Sets the alignment factor of the constraint

The factor depends on the Clutter.AlignConstraint :align-axis property and it is a value between 0.0 (meaning left, when Clutter.AlignConstraint :align-axis is set to Clutter.AlignAxis.X_AXIS; or meaning top, when Clutter.AlignConstraint :align-axis is set to Clutter.AlignAxis.Y_AXIS) and 1.0 (meaning right, when Clutter.AlignConstraint :align-axis is set to Clutter.AlignAxis.X_AXIS; or meaning bottom, when Clutter.AlignConstraint :align-axis is set to Clutter.AlignAxis.Y_AXIS). A value of 0.5 aligns in the middle in either cases

New in version 1.4.

set_source(source)
Parameters:

source (Clutter.Actor or None) – a Clutter.Actor, or None to unset the source

Sets the source of the alignment constraint

New in version 1.4.

Property Details

Clutter.AlignConstraint.props.align_axis
Name:

align-axis

Type:

Clutter.AlignAxis

Default Value:

Clutter.AlignAxis.X_AXIS

Flags:

READABLE, WRITABLE, CONSTRUCT

The axis to be used to compute the alignment

New in version 1.4.

Clutter.AlignConstraint.props.factor
Name:

factor

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE, CONSTRUCT

The alignment factor, as a normalized value between 0.0 and 1.0

The factor depends on the Clutter.AlignConstraint :align-axis property: with an align-axis value of Clutter.AlignAxis.X_AXIS, 0.0 means left and 1.0 means right; with a value of Clutter.AlignAxis.Y_AXIS, 0.0 means top and 1.0 means bottom.

New in version 1.4.

Clutter.AlignConstraint.props.source
Name:

source

Type:

Clutter.Actor

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

The Clutter.Actor used as the source for the alignment.

The Clutter.Actor must not be a child or a grandchild of the actor using the constraint.

New in version 1.4.