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 5 - Graphics Devices / Graphics Devices Reference
Routines for Graphics Devices / Creating, Setting, and Disposing of GDevice Records


SetGDevice

Your application can use the SetGDevice procedure to set a GDevice record as the current device.

PROCEDURE SetGDevice (gdh: GDHandle);
gdh
A handle to a GDevice record.
DESCRIPTION
The SetGDevice procedure sets the specified GDevice record as the current device. Your application won't generally need to use this procedure, because when your application draws into a window on one or more screens, Color QuickDraw automatically switches GDevice records as appropriate; and when your application needs to draw into an offscreen graphics world, it can use the SetGWorld procedure to set the graphics port as well as the GDevice record for the offscreen environment. However, if your application uses the SetPort procedure (described in the chapter "Basic QuickDraw" in this book) instead of the SetGWorld procedure to set the graphics port to or from an offscreen graphics world, then your application must use SetGDevice in conjunction with SetPort.

A handle to the currently active device is kept in the global variable TheGDevice.

SPECIAL CONSIDERATIONS
The SetGDevice procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.

SEE ALSO
See the chapter "Offscreen Graphics Worlds" in this book for information about the SetGWorld procedure and about drawing into offscreen graphics worlds.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996