Next: , Previous: ClutterActor, Up: Top


5 ClutterAlignConstraint

A constraint aligning the position of an actor

5.1 Overview

<clutter-align-constraint> is a <clutter-constraint> that aligns the position of the <clutter-actor> to which it is applied to the size of another <clutter-actor> using an alignment factor

<clutter-align-constraint> is available since Clutter 1.4

5.2 Usage

— Function: clutter-align-constraint-new (source <clutter-actor>) (axis <clutter-align-axis>) (factor float) ⇒  (ret <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

source
the <clutter-actor> to use as the source of the alignment, or ‘#f’.
axis
the axis to be used to compute the alignment
factor
the alignment factor, between 0.0 and 1.0
ret
the newly created <clutter-align-constraint>

Since 1.4

— Function: clutter-align-constraint-set-source (self <clutter-align-constraint>) (source <clutter-actor>)
— Method: set-source

Sets the source of the alignment constraint

align
a <clutter-align-constraint>
source
a <clutter-actor>, or ‘#f’ to unset the source.

Since 1.4

— Function: clutter-align-constraint-get-source (self <clutter-align-constraint>) ⇒  (ret <clutter-actor>)
— Method: get-source

Retrieves the source of the alignment

align
a <clutter-align-constraint>
ret
the <clutter-actor> used as the source of the alignment.

Since 1.4

— Function: clutter-align-constraint-set-factor (self <clutter-align-constraint>) (factor float)
— Method: set-factor

Sets the alignment factor of the constraint

The factor depends on the <"align-axis"> property and it is a value between 0.0 (meaning left, when <"align-axis"> is set to ‘CLUTTER_ALIGN_X_AXIS’; or meaning top, when <"align-axis"> is set to ‘CLUTTER_ALIGN_Y_AXIS’) and 1.0 (meaning right, when <"align-axis"> is set to ‘CLUTTER_ALIGN_X_AXIS’; or meaning bottom, when <"align-axis"> is set to ‘CLUTTER_ALIGN_Y_AXIS’). A value of 0.5 aligns in the middle in either cases

align
a <clutter-align-constraint>
factor
the alignment factor, between 0.0 and 1.0

Since 1.4

— Function: clutter-align-constraint-get-factor (self <clutter-align-constraint>) ⇒  (ret float)
— Method: get-factor

Retrieves the factor set using clutter-align-constraint-set-factor

align
a <clutter-align-constraint>
ret
the alignment factor

Since 1.4