Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

Support for QuickTime 4 APIs

QuickTime for Java contains support for these APIs in QuickTime 4: FlashMedia extensions to GraphicsImporter and GraphicsExporter.

With the exception of SoundManager APIs, this bring QuickTime for Java up to date with the QuickTime 4 API set. Completion of the Sound Manager representation will occur in the near future.

There is a new StdQTConstants4 file, which contains new constants that have been added since QuickTime for Java 3.

There is a new API/Interface in the quicktime.qd package, and the SetGWorld class has been deprecated. SetGWorld was used to set a port as current for operations such as recording picts, polygons, and regions -- in a particular, QDGraphics (GWorld/CGrafPort). However, particularly on the Mac OS, there are some situations where this cannot be guaranteed for the duration (until the mySetGWorld.reset() method is called).

Thus, a QDDrawer interface in the quicktime.qd package and QDGraphics.beginDraw (QDDrawer d) call has been added to QDGraphics. The port and device will remain set for the duration of the QDDrawer.draw call that is called by this begin draw method. In those recording operations, you must use this method to ensure correct and expected behaviour.

For other operations where your code is doing a great deal of drawing on a given QDGraphics, this can also be an efficient way of doing this, as the global context of port and device remains set for the duration of this call. The createPict sample code in the QuickTime for Java SDK contains an example usage of this call.

Note:   There is also an export call on the QTImageDrawer class, owing to recent developer feedback about translating a java.awt.Image to some kind of QT image (like a PICT). This method is provided as a means to accomplish this.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |