• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 19. Images > Animation

19.3. Animation

In the ImageData Fields for Animation Support section, we noted that we would provide an example of how to display animated images. Based on the information presented there and what we have learned above, we can now implement code that displays the animation.

To begin with, let us assume we are given an array of ImageData instances that represent the frames of the animation. In addition, each ImageData instance will have its delayTime field set to control how long the frame should be displayed and its disposalMethod field set to describe how to transition between that frame and the next. Our task is to display the resulting animation on a canvas.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint