Class
ClutterKeyframeTransition
Description [src]
class Clutter.KeyframeTransition : Clutter.PropertyTransition
{
/* No available fields */
}
Keyframe property transition
ClutterKeyframeTransition
allows animating a property by defining
“key frames”: values at a normalized position on the transition duration.
The ClutterKeyframeTransition
interpolates the value of the property
to which it’s bound across these key values.
Setting up a ClutterKeyframeTransition
means providing the times,
values, and easing modes between these key frames, for instance:
ClutterTransition *keyframe;
keyframe = clutter_keyframe_transition_new ("opacity");
clutter_transition_set_from (keyframe, G_TYPE_UINT, 255);
clutter_transition_set_to (keyframe, G_TYPE_UINT, 0);
clutter_keyframe_transition_set (CLUTTER_KEYFRAME_TRANSITION (keyframe),
G_TYPE_UINT,
1, /* number of key frames */
0.5, 128, CLUTTER_EASE_IN_OUT_CUBIC);
The example above sets up a keyframe transition for the ClutterActor:opacity
property of a ClutterActor
; the transition starts and sets the value of the
property to fully transparent; between the start of the transition and its mid
point, it will animate the property to half opacity, using an easy in/easy out
progress. Once the transition reaches the mid point, it will linearly fade the
actor out until it reaches the end of the transition.
The ClutterKeyframeTransition
will add an implicit key frame between the last
and the 1.0 value, to interpolate to the final value of the transition’s interval..
Instance methods
clutter_keyframe_transition_get_key_frame
Retrieves the details of the key frame at index_
inside transition
.
clutter_keyframe_transition_set_key_frame
Sets the details of the key frame at index_
inside transition
.
Methods inherited from ClutterPropertyTransition (2)
clutter_property_transition_get_property_name
Retrieves the value of the ClutterPropertyTransition:property-name
property.
clutter_property_transition_set_property_name
Sets the ClutterPropertyTransition:property-name
property of transition
.
Methods inherited from ClutterTransition (10)
clutter_transition_get_animatable
Retrieves the ClutterAnimatable
set using clutter_transition_set_animatable()
.
clutter_transition_get_interval
Retrieves the interval set using clutter_transition_set_interval()
.
clutter_transition_get_remove_on_complete
Retrieves the value of the ClutterTransition:remove-on-complete
property.
clutter_transition_set_animatable
Sets the ClutterTransition:animatable
property.
clutter_transition_set_from
Sets the initial value of the transition.
clutter_transition_set_from_value
Sets the initial value of the transition.
clutter_transition_set_interval
Sets the ClutterTransition:interval
property using interval
.
clutter_transition_set_remove_on_complete
Sets whether transition
should be detached from the ClutterAnimatable
set using clutter_transition_set_animatable()
when the
ClutterTimeline::completed
signal is emitted.
clutter_transition_set_to
Sets the final value of the transition.
clutter_transition_set_to_value
Sets the final value of the transition.
Methods inherited from ClutterTimeline (39)
Please see ClutterTimeline for a full list of methods.
Properties
Properties inherited from ClutterPropertyTransition (1)
Clutter.PropertyTransition:property-name
The name of the property of a ClutterAnimatable
to animate.
Properties inherited from ClutterTransition (3)
Clutter.Transition:animatable
The ClutterAnimatable
instance currently being animated.
Clutter.Transition:interval
The ClutterInterval
used to describe the initial and final states
of the transition.
Clutter.Transition:remove-on-complete
Whether the ClutterTransition
should be automatically detached
from the ClutterTransition:animatable
instance whenever the
ClutterTimeline::stopped
signal is emitted.
Properties inherited from ClutterTimeline (8)
Clutter.Timeline:actor
Clutter.Timeline:auto-reverse
If the direction of the timeline should be automatically reversed when reaching the end.
Clutter.Timeline:delay
A delay, in milliseconds, that should be observed by the timeline before actually starting.
Clutter.Timeline:direction
The direction of the timeline, either CLUTTER_TIMELINE_FORWARD
or
CLUTTER_TIMELINE_BACKWARD
.
Clutter.Timeline:duration
Duration of the timeline in milliseconds, depending on the
ClutterTimeline:frame-clock
value.
Clutter.Timeline:frame-clock
The frame clock driving the timeline.
Clutter.Timeline:progress-mode
Controls the way a ClutterTimeline
computes the normalized progress.
Clutter.Timeline:repeat-count
Defines how many times the timeline should repeat.
Signals
Signals inherited from ClutterTimeline (6)
ClutterTimeline::completed
The signal is emitted when the timeline’s
elapsed time reaches the value of the ClutterTimeline:duration
property.
ClutterTimeline::marker-reached
The signal is emitted each time a timeline
reaches a marker set with clutter_timeline_add_marker_at_time()
.
ClutterTimeline::new-frame
The signal is emitted for each timeline running timeline before a new frame is drawn to give animations a chance to update the scene.
ClutterTimeline::paused
The signal is emitted when clutter_timeline_pause()
is invoked.
ClutterTimeline::started
The signal is emitted when the timeline starts its run.
This might be as soon as clutter_timeline_start()
is invoked or
after the delay set in the ClutterTimeline:delay
property has expired.
ClutterTimeline::stopped
The signal is emitted when the timeline
has been stopped, either because clutter_timeline_stop()
has been
called, or because it has been exhausted.
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.