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 / Offscreen Graphics Worlds Reference
Routines


Creating, Altering, and Disposing of Offscreen Graphics Worlds

To create an offscreen graphics world, use the NewGWorld function. The NewGWorld function uses the NewScreenBuffer function to create and allocate memory for an offscreen pixel image; your application generally won't need to use NewScreenBuffer, but it is described here for completeness. The NewGWorld function similarly uses the NewTempScreenBuffer function to create and allocate temporary memory for an offscreen pixel image.

To change the pixel depth, boundary rectangle, or color table for an existing offscreen graphics world, use the UpdateGWorld function.

When you no longer need the pixel image associated with this offscreen graphics world, use the DisposeGWorld procedure to dispose of all the memory allocated for the offscreen graphics world. The DisposeGWorld procedure uses the DisposeScreenBuffer procedure when disposing of an offscreen graphics world; generally, your application won't need to use DisposeScreenBuffer.

Note
Before drawing into an offscreen graphics world, be sure to use the SetGWorld procedure (described on page 6-28) to make that offscreen world the current graphics port. In addition, before drawing into--or copying from--an offscreen pixel map, be sure to use the LockPixels function, which is described on page 6-32.

Subtopics
NewGWorld
NewScreenBuffer
NewTempScreenBuffer
UpdateGWorld
DisposeGWorld
DisposeScreenBuffer

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996