next up previous
Next: Imaging and Effects Up: QuickTime For Java Presenters Previous: QuickTime For Java Presenters

Subclasses of ImagePresenter

There are two basic subclasses of ImagePresenter, which inherit from and build on the features of ImagePresenter: QTImageProducer and QTEffectPresent. Both of these subclasses work in a similar fashion. They render their target objects (a movie or an effect) into an offscreen QDGraphics object. The pixel data from this QDGraphics is then set as the EncodedImage data of the superclass. An ImageDescription is created that describes this raw pixel data and this description is given to the superclass.

Thus, retrieving the image data (getImage()) returns the raw pixel data that the movie has drawn into. The ImagePresenter superclass then blits this raw pixel data to its destination QDGraphics. If this presenter is added as a Sprite, the raw pixel data becomes that sprite's image data. QTImageProducer takes a Movie object and implements the same interfaces as MoviePlayer, but it has the extra capability of being a presenter and having a graphics mode set for its overall appearance. QTEffectPresent is similar to QTImageProducer but takes a QTEffect object. You could use this presenter to capture the results of applying a filter to a source image. You could then discard the filter object and just present the resultant image. You can also use this presenter to present a character in a sprite animation that could transition on and off the stage.


next up previous
Next: Imaging and Effects Up: QuickTime For Java Presenters Previous: QuickTime For Java Presenters
Dave Marshall
10/4/2001