The Graphics Device Record
The color grafPort record contains information about a window, but there can
be many windows on a screen, and even many screens. The graphics device
record is the data structure that holds information about the physical
characteristics of a drawing environment.
Like the grafPort, the graphics device record is created automatically for you:
Slot Manager to create a graphics device record for each device found in a slot card during startup.
display devices. It collects this vital information in the graphics device record,
whose contents can be manipulated by a set of routines described in the
calls to the card's device-specific driver, which set and query characteristics
responsible for updating the graphics device records.
Much of the information in a graphics device record is too esoteric for an
overview, and the new offscreen graphics routines ( described in the
But a look at this last link is important in the conceptual chain.
The gdITable field points to an inverse table, which the Color Manager creates and maintains, and uses to quickly find the nearest match for a
requested color. (The technique is described in the Color Manager) The process is very fast once the table is built, but if a color is changed in the
device's CLUT, the Color Manager must rebuild the inverse table the next time it has to find a color. Using high tolerance values in the palettes
associated with your windows, rather than always demanding exact matches to
your colors, lessens the recalculations required. (For an explanation of
The gdPMap field contains a handle to the pixel map that reflects the imaging
capabilities of the device. The pixel map's type, size, and component fields
indicate whether the device is direct or indexed and what pixel depth it
displays. The pixel map's color table is synchronized with the CLUT on the
device.
The gdRect field describes the device's bounds in global coordinates.
If you want to work with offscreen graphics that have characteristics
different from those of the actual devices on the system, you can use the
offscreen graphics world routines to create and maintain offscreen port and