![]() |
![]() |
![]() |
Clutter Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
ClutterAlignConstraint; enum ClutterAlignAxis; ClutterConstraint * clutter_align_constraint_new (ClutterActor *source
,ClutterAlignAxis axis
,gfloat factor
);
GObject +----GInitiallyUnowned +----ClutterActorMeta +----ClutterConstraint +----ClutterAlignConstraint
"align-axis" ClutterAlignAxis : Read / Write / Construct "factor" gfloat : Read / Write / Construct "source" ClutterActor* : Read / Write / Construct
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
typedef struct _ClutterAlignConstraint ClutterAlignConstraint;
ClutterAlignConstraint is an opaque structure whose members cannot be directly accesses
Since 1.4
typedef enum { /*< prefix=CLUTTER_ALIGN >*/ CLUTTER_ALIGN_X_AXIS, CLUTTER_ALIGN_Y_AXIS, } ClutterAlignAxis;
Specifies the axis on which ClutterAlignConstraint should maintain the alignment
Maintain the alignment on the X axis | |
Maintain the alignment on the Y axis |
Since 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
|
the ClutterActor to use as the source of the alignment |
|
the axis to be used to compute the alignment |
|
the alignment factor, between 0.0 and 1.0 |
Returns : |
the newly created ClutterAlignConstraint |
Since 1.4
"align-axis"
property"align-axis" ClutterAlignAxis : Read / Write / Construct
The axis to be used to compute the alignment
Default value: CLUTTER_ALIGN_X_AXIS
Since 1.4
"factor"
property "factor" gfloat : Read / Write / Construct
The alignment factor, as a normalized value between 0.0 and 1.0
The "factor" depends on the
"align-axis" value: with CLUTTER_ALIGN_X_AXIS
,
0.0 means left and 1.0 means right; with CLUTTER_ALIGN_Y_AXIS
, 0.0
means top and 1.0 means bottom
Allowed values: [0,1]
Default value: 0
Since 1.4
"source"
property"source" ClutterActor* : Read / Write / Construct
The ClutterActor used as the source for the alignment
Since 1.4