Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 6 - Offscreen Graphics Worlds


About Offscreen Graphics Worlds

An offscreen graphics world is defined by a private data structure that, in Color QuickDraw, contains a CGrafPort record and its handles to associated PixMap and ColorTable records. The offscreen graphics world also contains a reference to a GDevice record and other state information. On computers lacking Color QuickDraw, GWorldPtr points to an extension of the GrafPort record. An offscreen graphics world for a basic QuickDraw system does not contain a reference to a GDevice record, but it does support a special type of 1-bit pixel map. When your application uses the NewGWorld function to create an offscreen world, NewGWorld returns a pointer of type GWorldPtr, which your application uses to refer to the offscreen graphics world. This pointer is defined as follows:

TYPE GWorldPtr = CGrafPtr;
Offscreen graphics worlds have two primary purposes.

The term offscreen graphics world implies that you prepare an image on the global coordinate plane somewhere outside the boundary rectangles for the user's screens. While this is possible, you more typically use the coordinates of the port rectangle for an onscreen window when preparing your "offscreen" image; until you copy the image to the onscreen window, the image in the offscreen graphics world is drawn into a part of memory not used by the video device and therefore remains hidden from the user.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996