rgbFgColor
CGrafPort structure
#include <Quickdraw.h>
typedef struct CGrafPort{ Size Offset Description
short device; 2 0 Device-specific info; 0=screen
PixMapHandle portPixMap; 4 2 port's pixel map
short portVersion; 2 6 High bits set
Handle grafVars; 4 8 Handle to additional fields
short chExtra; 2 12 Widen text and numeric characters,
short pnLocHFrac; 2 14 Fractional horizontal pen position
Rect portRect; 8 16 Writeable interior, for more
information
RgnHandle visRgn; 4 24 Portion not covered by other
windows
RgnHandle clipRgn; 4 28 User-definable clipping region, see
PixPatHandle bkPixPat; 4 32 Color background pattern see
RGBColor rgbFgColor; 6 36 requested foreground color see
RGBColor rgbBkColor; 6 42 requested background color see
Point pnLoc; 4 48 Pen location in local coords see
Point pnSize; 4 52 .v=height, .h=width of pen see
short pnMode; 2 56 see PenMode
PixPatHandle pnPixPat; 4 58 Color pen pattern used in drawing,
see PenPat
Pattern fillPixPat; 4 62 Color fill pattern
short pnVis; 2 66 If <0, pen is invisible
short txFont; 2 68 Font; 0= system, 1=application see
Style txFace; 1 70 Text style; see TextFace
char filler; 1 71
short txMode; 2 72 Transfer Mode
short txSize; 2 74 Text size in points
Fixed spExtra; 4 76 Spacing for full justification
long fgColor; 4 80 Old-model color for foreground see
long bkColor; 4 84 Old-model color for background, see
short colrBit; 2 86 Old-model color plane
short patStretch; 2 88 Used internally; printer aspect ratio
adjustment
Handle picSave; 4 92 PicHandle if pict being saved.
Handle rgnSave; 4 96 RgnHandle if region is being saved.
Handle polySave; 4 100 PolyHandle if polygon being saved.
CQDProcsPtr grafProcs; 4 104 Addr of struct with addresses of
custom routines
} CGrafPort; 108
typedef CGrafPort *CGrafPtr;
typedef CGrafPtr GWorldPtr;

Notes: The CGrafPort structure is used indirectly in virtually every Color
Quickdraw, Window Manager, Dialog Manager, etc. function. A CGrafPtr is
used directly in calls to:
Calls to NewCWindow (GetNewCWindow) and NewCDialog
(GetNewDialog) et al., allocate and initialize a CGrafPort as part of a
The Quickdraw variable thePort is a pointer to the current active
CGrafPort.
A NIL (0) value in picSave, rgnSave, or polySave indicates that no picture
(or region or polygon) recording is currently taking place. A NIL value in
cGrafProcs indicates that the standard routines will handle all Quickdraw
functions.