MediaSetGWorld
TheMediaSetGWorldfunction allows your derived media handler to learn about changes to your media's graphic environment.
pascal ComponentResult MediaSetGWorld (ComponentInstance ci, CGrafPtr aPort, GDHandle aGD);
ci- Identifies the Movie Toolbox's connection to your derived media handler.
aPort- Contains a pointer to the new graphics port. Note that this may be either a color or a black-and-white port.
aGD- Contains a handle to the new graphics device.
DESCRIPTION
The Movie Toolbox calls your derived media handler'sMediaSetGWorldfunction whenever your media's graphics world changes. The toolbox provides you with the
new graphics port and graphics device. You should then use this information for subsequent graphics operations.Your derived media handler should support this function if you perform specialized graphics processing or if you are using the Image Compression Manager to decompress your media. Note that when the Movie Toolbox calls your
MediaIdlefunction, it supplies you with information about the current graphics environment. Consequently, you do not need to support theMediaSetGWorldfunction in order to draw during playback. However, if your media data is compressed and you are using the Image Compression Manager to decompress sequences, you may need to provide updated graphics environment information before playback.You obtain the initial graphics environment information from the
moviePortandmovieGDfields of the movie parameter structure that the Movie Toolbox provides to yourMediaInitializefunction.The Movie Toolbox calls this function only if you have set the
handlerHasSpatialflag to 1 in theflagsparameter of theMediaSetHandlerCapabilitiesfunction.RESULT CODES
Any Component Manager result code