Rechercher une page de manuel
Clutter::Effect.3pm
Langue: en
Version: 2008-10-14 (ubuntu - 08/07/09)
Section: 3 (Bibliothèques de fonctions)
NAME
Clutter::Effect - Simple animation functionsDESCRIPTION
Clutter::Effect contains a set of functions for simple, one-off animations involving a single actor. It is a convenience wrapper around the more complex an powerful animations objects, Clutter::Behaviour, Clutter::Alpha and Clutter::Timeline.Effects are created from a template, which binds a Clutter::Timeline and an alpha function, similarly to how Clutter::Alpha works. You can reuse a template for multiple animations.
After you have created a Clutter::EffectTemplate you can call one of the simple class methods, providing the template object and the parameters for the animation. You can optionally pass a function reference, which will be invoked when the animation stops; the function reference has this signature:
sub effect_complete { my $actor = shift; my $data = shift; # ... }
Every Clutter::Effect class method returns a copy of the Clutter::Timeline used in the template, so you can control the animation with it. NOTE: you cannot loop an effect.
METHODS
effecttemplate = Clutter::EffectTemplate->new ($timeline, $alpha_func)
effecttemplate = Clutter::EffectTemplate->new ($timeline, $alpha_func)
-
- •
- $timeline (Clutter::Timeline)
- •
- $alpha_func (scalar)
effecttemplate = Clutter::EffectTemplate->new_for_duration ($duration, $alpha_func)
effecttemplate = Clutter::EffectTemplate->new_for_duration ($duration, $alpha_func)
-
- •
- $duration (integer)
- •
- $alpha_func (scalar)
timeline = Clutter::Effect->depth ($template, $actor, $end, $func=undef, $data=undef)
timeline = Clutter::Effect->depth ($template, $actor, $end, $func=undef, $data=undef)
-
- •
- $template (Clutter::EffectTemplate)
- •
- $actor (Clutter::Actor)
- •
- $end (integer)
- •
- $func (scalar)
- •
- $data (scalar)
timeline = Clutter::Effect->fade ($template, $actor, $end, $func=undef, $data=undef)
timeline = Clutter::Effect->fade ($template, $actor, $end, $func=undef, $data=undef)
-
- •
- $template (Clutter::EffectTemplate)
- •
- $actor (Clutter::Actor)
- •
- $end (unsigned)
- •
- $func (scalar)
- •
- $data (scalar)
timeline = Clutter::Effect->move ($template, $actor, $x, $y, $func=undef, $data=undef)
timeline = Clutter::Effect->move ($template, $actor, $x, $y, $func=undef, $data=undef)
-
- •
- $template (Clutter::EffectTemplate)
- •
- $actor (Clutter::Actor)
- •
- $x (integer)
- •
- $y (integer)
- •
- $func (scalar) a code reference
- •
- $data (scalar) a scalar to pass to func
Moves actor from its current position to the x and y coordinates
timeline = Clutter::Effect->rotate ($template, $actor, $axis, $angle, $x=0, $y=0, $z=0, $direction=CLUTTER_ROTATE_CW, $func=undef, $data=undef)
timeline = Clutter::Effect->rotate ($template, $actor, $axis, $angle, $x=0, $y=0, $z=0, $direction=CLUTTER_ROTATE_CW, $func=undef, $data=undef)
-
- •
- $template (Clutter::EffectTemplate)
- •
- $actor (Clutter::Actor)
- •
- $axis (Clutter::RotateAxis)
- •
- $angle (double)
- •
- $x (integer)
- •
- $y (integer)
- •
- $z (integer)
- •
- $direction (Clutter::RotateDirection)
- •
- $func (scalar)
- •
- $data (scalar)
timeline = Clutter::Effect->scale ($template, $actor, $x_end, $y_end, $func=undef, $data=undef)
timeline = Clutter::Effect->scale ($template, $actor, $x_end, $y_end, $func=undef, $data=undef)
-
- •
- $template (Clutter::EffectTemplate)
- •
- $actor (Clutter::Actor)
- •
- $x_end (double)
- •
- $y_end (double)
- •
- $func (scalar)
- •
- $data (scalar)
boolean = $template_->get_timeline_clone
boolean = $template_->get_timeline_clone
$template_->set_timeline_clone ($clone)
$template_->set_timeline_clone ($clone)
-
- •
- $clone (boolean)
ENUMS AND FLAGS
enum Clutter::RotateAxis
- •
- 'x-axis' / 'CLUTTER_X_AXIS'
- •
- 'y-axis' / 'CLUTTER_Y_AXIS'
- •
- 'z-axis' / 'CLUTTER_Z_AXIS'
enum Clutter::RotateDirection
- •
- 'cw' / 'CLUTTER_ROTATE_CW'
- •
- 'ccw' / 'CLUTTER_ROTATE_CCW'
SEE ALSO
ClutterCOPYRIGHT
Copyright (C) 2006 OpenedHand Ltd.This module is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public Library version 2.1, or under the terms of the Artistic License. See Clutter for the full copyright notice.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre