March 93 - GRAPHICAL TRUFFLES
GRAPHICAL TRUFFLES
THE PALETTE MANAGER WAY
EDGAR LEE AND FORREST TANAKA
No part of the Macintosh graphics environment is more feared, hated, or
misunderstood than the Palette Manager. The Developer Support Center gets many
questions about it from people who don't have any idea how to get it to do what they
want. We've seen many people just give up on the Palette Manager completely and
instead use lower-level routines that are much more difficult to use but easier to
understand quickly.
The Palette Manager is actually very simple. It has no complicated heuristics that only
rocket scientists can understand. In this column, we'll show how the Palette Manager
gets its job done, and we'll talk about a couple of issues that you'll have to deal with to
make your palettes do what you want them to do. You'll see that the Palette Manager is
both easy to understand and a very useful part of the Macintosh Toolbox.
Before you read this column, it would be a good idea to read the Palette Manager
chapter (Chapter 20) ofInside MacintoshVolume VI, which lays down the terminology
that we'll use here.
WHAT HAPPENS WHEN A PALETTE IS ACTIVATED
The critical job that the Palette Manager does is activate a palette. This happens