Important: The information in this document is obsolete and should not be used for new development.
Reporting Data Structure Changes to QuickDraw
In quest of faster execution time, some applications directly modifyColorTable
,PixPat
,GrafPort
,CGrafPort
, orGDevice
records rather than using the routines provided for that purpose. Direct manipulation of the fields of these records can cause problems now, and may cause additional problems as QuickDraw continues to evolve.For example, the Color Manager (described in the chapter "Color Manager" in Advanced Color Imaging on the Mac OS) maintains an inverse table for every color table with which it works in order to speed up the process of searching the color table. If your application directly changes an entry in the color table, the Color Manager doesn't know that its inverse table no longer works correctly.
However, by using the routines
CTabChanged
,PixPatChanged
,PortChanged
, andGDeviceChanged
, you can lessen the adverse effects of directly modifying the fields ofColorTable
,PixPat
,GrafPort
,CGrafPort
, andGDevice
records. For example, should you directly change the field of aColorTable
record and then call theCTabChanged
procedure, it invalidates thectSeed
field of theColorTable
record, which signals the Color Manager that the table has been changed and its inverse table needs to be rebuilt.
Subtopics
- CTabChanged
- PixPatChanged
- PortChanged
- GDeviceChanged