Tk::Animation (3)
Leading comments
Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAME
Tk::Animation - Display sequence of Tk::Photo imagesSYNOPSIS
use Tk::Animation my $img = $widget->Animation('-format' => 'gif', -file => 'somefile.gif'); $img->add_frame(@images); $img->start_animation; $img->start_animation( $period ); $img->next_image; $img->prev_image; $img->set_image( 0 .. $#frames ); $img->pause_animation; $img->resume_animation( $period ); $img->fast_forward( $multiplier ); $img->fast_reverse( $multiplier ); $img->stop_animation; $img->set_disposal_method( $boolean );
DESCRIPTION
In the simple case when "Animation" is passed aThe "add_frame" method adds images to the sequence. It is provided to allow animations to be constructed from separate images. All images must be "Photo"s and should all be the same size.
"start_animation($period)" then initiates a "repeat" with specified $period to sequence through these images. As for raw "repeat" $period is in milliseconds, for a 50Hz monitor it should be at least 20ms. If $period is omitted it is determined from the
"stop_animation" cancels the "repeat" and resets the image to the first image in the sequence.
For fine-grained control "next_image" and "prev_image" move one frame forward or backward. "set_image" randomly positions the animation to a particular frame.
"pause_animation" pauses the movie and "resume_animation" continues from the pause point.
"fast_forward" and "fast_reverse" speed through the movie either forwards or backwards. $multiplier specifies how much faster the animation moves.
If Image::Info is installed, then the repeat period time and disposal method of
NOTES
"set_disposal_method" was formerly known as "blank" method, but the naming of this method was a mistake.If the disposal method is not set correctly, either by "set_disposal_method" or by determining from the
BUGS
This module should not depend on a module which is not declared as a dependency (Image::Info).The delays between images may vary in a
The handling of the various disposal methods is not correct.