Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | |
2 | =head1 NAME | |
3 | ||
4 | Tk::Animation - Display sequence of Tk::Photo images | |
5 | ||
6 | =for pm Tk/Animation.pm | |
7 | ||
8 | =for category Tk Image Classes | |
9 | ||
10 | =head1 SYNOPSIS | |
11 | ||
12 | use Tk::Animation | |
13 | my $img = $widget->Animation('-format' => 'gif', -file => 'somefile.gif'); | |
14 | ||
15 | $img->start_animation($period); | |
16 | $img->stop_animation; | |
17 | ||
18 | $img->add_frames(@images); | |
19 | ||
20 | =head1 DESCRIPTION | |
21 | ||
22 | In the simple case when C<Animation> is passed a GIF89 style GIF with | |
23 | multiple 'frames', it will build an internal array of C<Photo> images. | |
24 | ||
25 | C<start_animation($period)> then initiates a C<repeat> with specified I<$period> | |
26 | to sequence through these images. | |
27 | ||
28 | C<stop_animation> cancels the C<repeat> and resets the image to the first | |
29 | image in the sequence. | |
30 | ||
31 | The C<add_frames> method adds images to the sequence. It is provided | |
32 | to allow animations to be constructed from separate images. | |
33 | All images must be C<Photo>s and should all be the same size. | |
34 | ||
35 | =head1 BUGS | |
36 | ||
37 | The 'period' should probably be a property of the Animation object | |
38 | rather than specified at 'start' time. It may even be embedded | |
39 | in the GIF. | |
40 | ||
41 | =cut | |
42 |