| Previous | Next
Tk::AnimationRecall our circle bitmap from Figure 17-5 and how, with the addition of an inverted mask, we made the circle transparent. Using a timer event, we can make the bitmap cycle between solid and transparent so it flashes like a pulsar.
Some call this animation, crude as it may be. Perl/Tk supplies an Animation widget in the standard distribution, designed to render a series of Photos, like frames in a movie film. It's also smart enough to handle GIF89 images that contain multiple frames per image. Here's a program that accepts a list of image filenames from the command line and animates them.
If no images are specified, the program defaults to the multiframe "Powered by Perl" GIF89 image, as Figure 17-16 shows. Figure 17-16. GIF89 images can be multiframe |