Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 4 - Color QuickDraw / Color QuickDraw Reference
Color QuickDraw Routines


Reporting Data Structure Changes to QuickDraw

In quest of faster execution time, some applications directly modify ColorTable, PixPat, GrafPort, CGrafPort, or GDevice 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, and GDeviceChanged, you can lessen the adverse effects of directly modifying the fields of ColorTable, PixPat, GrafPort, CGrafPort, and GDevice records. For example, should you directly change the field of a ColorTable record and then call the CTabChanged procedure, it invalidates the ctSeed field of the ColorTable 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

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996