[self-interest] true colors

Jecel Assumpcao Jr jecel at lsi.usp.br
Sat Nov 21 00:57:48 UTC 1998


Ok, I made a quick and very dirty patch to allow Self to run on
16 and 32 (24, actually) bit per pixel displays. Unfortunately there
is a bug in the image/mask code that causes it to crash immediately,
but at least you get to see the debugger come up in glorious true
colors ;-)

You can download this (and my other patches) from

  http://www.lsi.usp.br/~jecel/release/patches

The name is "trueColorPatch.self". It only affects two methods in
traits paintManager. While it looked at first glance that the idea
of 8 bpp was spread throughout UI2, that turned out not to be the
case. Several objects call paintManager to convert a paint object
into a colormap index (which true color doesn't have), but then all
they do with it is pass it on to X Windows. So by returning an
integer with the RGB values in it instead of an index, paintManager
can work with 16 and 32 bit color values.

The bug that keeps this from working is in the code where a "mask"
is generated from an xlib xImage. It tried to do some tricks with
color maps for converting from 8 bpp to 1 bpp mapping all colors
to black, except for one that is mapped to white. I'll look into
this next week.

-- Jecel

------------------------------------------------------------------------
Free Web-based e-mail groups -- http://www.eGroups.com




More information about the Self-interest mailing list