A constraint aligning the position of an actor
<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
<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
<clutter-align-constraint>
) (source <clutter-actor>
)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
<clutter-align-constraint>
) ⇒ (ret <clutter-actor>
)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
<clutter-align-constraint>
) (factor float
)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