Important: The information in this document is obsolete and should not be used for new development.
Saving and Restoring Graphics Ports
If your application draws into more than one graphics port (basic or color), you can use theSetPort
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 theGetPort
procedure to save the current graphics port (basic or color), usingSetPort
to set the graphics port you want to draw in, and then usingSetPort
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 ofGetPort
, and it should use theSetGWorld
procedure instead ofSetPort
. 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