File: Animation.pod

package info (click to toggle)
perl-tk 1%3A800.024-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 18,528 kB
  • ctags: 19,152
  • sloc: ansic: 206,767; perl: 40,255; makefile: 4,370; sh: 2,290; yacc: 762
file content (44 lines) | stat: -rw-r--r-- 1,160 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

=head1 NAME

Tk::Animation - Display sequence of Tk::Photo images

=for pm Tk/Animation.pm

=for category Tk Image Classes

=head1 SYNOPSIS

  use Tk::Animation
  my $img = $widget->Animation('-format' => 'gif', -file => 'somefile.gif');

  $img->add_frames(@images);

  $img->start_animation($period);
  $img->stop_animation;


=head1 DESCRIPTION

In the simple case when C<Animation> is passed a GIF89 style GIF with
multiple 'frames', it will build an internal array of C<Photo> images.

The C<add_frames> method adds images to the sequence. It is provided
to allow animations to be constructed from separate images.
All images must be C<Photo>s and should all be the same size.

C<start_animation($period)> then initiates a C<repeat> with specified I<$period>
to sequence through these images. As for raw C<repeat> I<$period> is in milli-seconds,
for a 50Hz monitor it should be at least 20mS.

C<stop_animation> cancels the C<repeat> and resets the image to the first
image in the sequence.

=head1 BUGS

The 'period' should probably be a property of the Animation object
rather than specified at 'start' time. It may even be embedded
in the GIF.

=cut