[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color manager and palette manager



1. You should never use the Color Manager. It does not deal with the problem
of sharing the screen(s) between multiple apps. Unless you are doing some very
specialized in-house app, stay away from it.
If you don't care about exact colors, just use set-fore-color and set-back-
color. Else try the Palette Manager.

2. I tried to write some code when I was using MACL1.3.x. I never had time to
make it work.

3. That's the usual mistake. QuickDraw draws into pixmaps, not windows (it does
not know about them), and windows do not own a pixmap. So what is this pixmap
in the window record? It is the pixmap associated with the main screen (thus
shared by ALL windows).
There is a pixmap associated with each screen, of the right depth. When you
ask QD to draw in a pixmap, it checks if it is the pixmap of the main screen.
If not, it is an offscreen pixmap, and it just draws in it. If yes, QD draws
as needed in ALL screens pixmaps.
That's why you get a b&w image. The "window" pixmap you use is the pixmap of
your main screen, that is 1-bit deep. That's also why copying bits from the
screen does not work.
If you already have offscreen pixmaps, to all your drawing there, then CopyBits
to the screen. It's not more difficult, and it works.
     Daniel.