Clutter.AlignConstraint¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/c |
The axis to align the position to |
||
r/w/c |
The alignment factor, between 0.0 and 1.0 |
||
r/w/c |
The source of the alignment |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Clutter.AlignConstraint(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Clutter.AlignConstraint
is an opaque structure whose members cannot be directly accessesNew in version 1.4.
- classmethod new(source, axis, factor)¶
- Parameters:
source (
Clutter.Actor
orNone
) – theClutter.Actor
to use as the source of the alignment, orNone
axis (
Clutter.AlignAxis
) – the axis to be used to compute the alignmentfactor (
float
) – the alignment factor, between 0.0 and 1.0
- Returns:
the newly created
Clutter.AlignConstraint
- Return type:
Creates a new constraint, aligning a
Clutter.Actor
's position with regards of the size of the actor to source, with the given alignment factorNew in version 1.4.
- get_align_axis()¶
- Returns:
the alignment axis
- Return type:
Retrieves the value set using
Clutter.AlignConstraint.set_align_axis
()New in version 1.4.
- get_factor()¶
- Returns:
the alignment factor
- Return type:
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:
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, whenClutter.AlignConstraint
:align-axis
is set toClutter.AlignAxis.X_AXIS
; or meaning top, whenClutter.AlignConstraint
:align-axis
is set toClutter.AlignAxis.Y_AXIS
) and 1.0 (meaning right, whenClutter.AlignConstraint
:align-axis
is set toClutter.AlignAxis.X_AXIS
; or meaning bottom, whenClutter.AlignConstraint
:align-axis
is set toClutter.AlignAxis.Y_AXIS
). A value of 0.5 aligns in the middle in either casesNew in version 1.4.
- set_source(source)¶
- Parameters:
source (
Clutter.Actor
orNone
) – aClutter.Actor
, orNone
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:
- Default Value:
- Flags:
The axis to be used to compute the alignment
New in version 1.4.
- Clutter.AlignConstraint.props.factor¶
-
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 ofClutter.AlignAxis.X_AXIS
, 0.0 means left and 1.0 means right; with a value ofClutter.AlignAxis.Y_AXIS
, 0.0 means top and 1.0 means bottom.New in version 1.4.
- Clutter.AlignConstraint.props.source¶
- Name:
source
- Type:
- Default Value:
- Flags:
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.