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 2 - Basic QuickDraw / Basic QuickDraw Reference
Routines


Saving and Restoring Graphics Ports

If your application draws into more than one graphics port (basic or color), you can use the SetPort procedure to set the graphics port into which you want to draw. At times you may need to preserve the current graphics port. You can do this by using the GetPort procedure to save the current graphics port (basic or color), using SetPort to set the graphics port you want to draw in, and then using SetPort again when you need to restore the previous graphics port.

Note
When your application runs in Color QuickDraw or uses offscreen graphics worlds, it should use the GetGWorld procedure instead of GetPort, and it should use the SetGWorld procedure instead of SetPort. These procedures save and restore the current graphics port for basic and color graphics ports as well as offscreen graphics worlds. See the chapter "Offscreen Graphics Worlds" for more information.

Subtopics
GetPort
SetPort

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996