home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _8f178ec825efb2c660e976055a3501cb < prev    next >
Encoding:
Text File  |  2004-06-01  |  2.2 KB  |  74 lines

  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->add_frame(@images);
  16.  
  17.   $img->start_animation( $period );
  18.  
  19.   $img->next_image;
  20.   $img->prev_image;
  21.   $img->set_image( 0 .. $#frames );
  22.  
  23.   $img->pause_animation;
  24.   $img->resume_animation( $period );
  25.  
  26.   $img->fast_forward( $multiplier );
  27.   $img->fast_reverse( $multiplier );
  28.  
  29.   $img->stop_animation;
  30.  
  31.   $img->blank( $boolean );
  32.  
  33. =head1 DESCRIPTION
  34.  
  35. In the simple case when C<Animation> is passed a GIF89 style GIF with
  36. multiple 'frames', it will build an internal array of C<Photo> images.
  37.  
  38. The C<add_frame> method adds images to the sequence. It is provided
  39. to allow animations to be constructed from separate images.
  40. All images must be C<Photo>s and should all be the same size.
  41.  
  42. C<start_animation($period)> then initiates a C<repeat> with specified
  43. I<$period> to sequence through these images. As for raw C<repeat>
  44. I<$period> is in milliseconds, for a 50Hz monitor it should be at
  45. least 20mS. If $period is omitted it defaults to 100 milliseconds.
  46.  
  47. C<stop_animation> cancels the C<repeat> and resets the image to the first
  48. image in the sequence.
  49.  
  50. For fine-grained control C<next_image> and C<prev_image> move one frame forward
  51. or backward.  C<set_image> randomly positions the animation to a particular frame.
  52.  
  53. C<pause_animation> pauses the movie and C<resume_animation> continues from the
  54. pause point.
  55.  
  56. C<fast_forward> and C<fast_reverse> speed through the movie either
  57. forwards or backwards.  $multiplier specifies how much faster the
  58. animation moves.
  59.  
  60. By default Animation leaves the previous movie frame in the animation
  61. photo.  Many times overlaying subsequent frames produces a composite
  62. that looks blurred.  The C<blank> method is used to blank the
  63. animation photo before displaying new frames.  The default is 0 for
  64. backward compatibility.
  65.  
  66. =head1 BUGS
  67.  
  68. The 'period' should probably be a property of the Animation object
  69. rather than specified at 'start' time. It may even be embedded
  70. in the GIF.
  71.  
  72. =cut
  73.  
  74.