SetPort
SetPort Activate a GrafPort
#include <Quickdraw.h> Quickdraw
void SetPort(whichPort );
GrafPtr whichPort ; pointer to a GrafPort
SetPort makes the specified GrafPort (or WindowPtr or DialogPtr, et.al.)
into the active GrafPort. It stores whichPort into the global variable thePort.
whichPort is a pointer to a previously opened 108-byte GrafPort structure
you now want to activate.
Returns: none

Notes: All Quickdraw activities are performed based upon values in the current
active GrafPort and use its local coordinate system. All drawing is
performed on the BitMap . thePort->portBits.
This function is typically used to restore a previously-active GrafPort
after switching to an other. For instance, a window update activity may be
surrounded by GetPort and SetPort, as follows:
GrafPtr savePort; /* temporary storage */
GetPort( &savePort ); [TOKEN:12074] save current GrafPort */
SetPort ( myWindow ); [TOKEN:12074] select local one */
.
. ... do some updating on the local window ...
.
SetPort(savePort); [TOKEN:12074] restore previous GrafPort */