OpenPort
visRgn and clipRgn, and activates the GrafPort. structure may reside as a static or auto variable in a procedure or
you you may allocate the storage via NewPtr.
Notes: You normally won't need to use this, since the Window Manager calls this
If used, the typical sequence is:
Use ClosePort to dispose of the memory allocated. As above, the Window Manager does this for you when you close a window.
the time you open it and the time you close it. QuickDraw keeps a list of
pointers to open ports. If a port moves, QuickDraw won't be able to find it.
The fields of whichPort GrafPort are initialized as follows: Field Data Type Initial Setting
device short 0 (the screen)
portBits BitMap screenBits (global variable) portRect Rect screenBits.bounds (global variable) (-32767,-32767) to (32767, 32767)
clipRgn RgnHandle handle to a rectangular region (as above) pnMode short patCopy (8)
pnPat Pattern black (global variable) pnVis short 0 ( visible)
txFont short 0 (system font; i.e., chicago)
txMode short srcOr (2)
txSize short 0 (system font size; i.e., 12)
fgColor long blackColor (33)
bkColor long whiteColor (30)
colrBit short 0
patStretch short 0
grafProcs QDProcsPtr NIL (0)