Top | ![]() |
![]() |
![]() |
![]() |
ClutterAlignConstraint is a ClutterConstraint that aligns the position of the ClutterActor to which it is applied to the size of another ClutterActor using an alignment factor
ClutterAlignConstraint is available since Clutter 1.4
ClutterConstraint * clutter_align_constraint_new (ClutterActor *source
,ClutterAlignAxis axis
,gfloat factor
);
Creates a new constraint, aligning a ClutterActor's position with
regards of the size of the actor to source
, with the given
alignment factor
source |
the ClutterActor to use as the source of the
alignment, or |
[allow-none] |
axis |
the axis to be used to compute the alignment |
|
factor |
the alignment factor, between 0.0 and 1.0 |
Since: 1.4
void clutter_align_constraint_set_source (ClutterAlignConstraint *align
,ClutterActor *source
);
Sets the source of the alignment constraint
Since: 1.4
ClutterActor *
clutter_align_constraint_get_source (ClutterAlignConstraint *align
);
Retrieves the source of the alignment
Since: 1.4
void clutter_align_constraint_set_align_axis (ClutterAlignConstraint *align
,ClutterAlignAxis axis
);
Sets the axis to which the alignment refers to
Since: 1.4
ClutterAlignAxis
clutter_align_constraint_get_align_axis
(ClutterAlignConstraint *align
);
Retrieves the value set using clutter_align_constraint_set_align_axis()
Since: 1.4
void clutter_align_constraint_set_factor (ClutterAlignConstraint *align
,gfloat 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
Since: 1.4
gfloat
clutter_align_constraint_get_factor (ClutterAlignConstraint *align
);
Retrieves the factor set using clutter_align_constraint_set_factor()
Since: 1.4
typedef struct _ClutterAlignConstraint ClutterAlignConstraint;
ClutterAlignConstraint is an opaque structure whose members cannot be directly accesses
Since: 1.4
Specifies the axis on which ClutterAlignConstraint should maintain the alignment.
Since: 1.4