Sprites were introducted in QuickTime 2.5 and have since been enhanced in later versions of QuickTime.
The metaphor of a sprite animation as a theatrical play is used, in which sprite tracks are characterized as the boundaries of the stage and a sprite world or a as the stage itself. To extend the metaphor, you may want to think of sprites as actors performing on that stage.
Each sprite has that describe its location and appearance at a given time. During an animation sequence, modifying the sprite’s properties causes it to change its appearance and move around the screen. Sprites may be mixed with still–image graphics to produce a wide variety of effects while using relatively little memory.
The QTPlugin provides the developers with the Sprite Framework to add sprite–based animation to their applications. The Sprite Framework, which is a set of classes, handles all the tasks necessary to compose and modify sprites, their backgrounds and properties, in addition to transferring the results to the screen or to an alternate destination.
QTPlugin uses sprite media samples to set/get data from Sprite Framework classes that need them (i.e. when creating ). There are two basic kinds of sprite media samples:
- those that define the sprite image array and set the initial properties of a frame
- those that animate the sprites in the track by specifying changes to the sprites’ properties
The QTPlgSpriteMediaSample class is part of the Sprite Framework and defines an abstract container suitable for use with basic sprite objects (both and objects). Its derived classes lets the developers to define unambiguously the type of sprite samples, key frame or override frames, have to be added to the target destination.
→ → →
The class has not constructor at all (you can always use the Realbasic common constructor syntax, of course, but you will obtain an usless object). Its destructor, will be implicitly invoked every time one of its derived classes will be destroyed.