nanogui: Pixmaps
Subject:
RE: Pixmaps
From:
Greg Haerr ####@####.####
Date:
20 May 1999 16:36:08 -0000
Message-Id: <01BEA2AC.338BB0E0.greg@censoft.com>
> : I can see the
> : point of server side bitmaps, sure, but what use are multi-layer pixmaps?
>
> They aren't multi-layered, per se. They are just hunks of data. A 1
> bit pixmap is the same thing as a 8 bit pixmap. It isn't a good idea
> to think of them as layers, because they really aren't. True, a 1 bit
> pixmap can be used as a clip mask, which gives the illusion of
> layering, but it is just clipping.
>
Yes. This is the idea. There is one more bit (no pun) of detail
though between a monochrome and 8 bit pixmap, though. The draw routines
will use the fg color for the 1 bits and bg color for the 0 bits in the pixmap, when
drawing. The bigger bit-depth pixmaps use the system palette for each pixel,
where the pixel is the palette index. Now, in some cases, it is desirable to carry
around an alternate palette with the bits. This is the case with the .gif file format,
for instance. In this case, the system repalettizes a portion of the system
palette to display the image. I was thinking of writing all this code.
Finally, with 15, 16, 24 and 32 bit pixmaps, the system builds a 32 bit
RGB value from each pixel, and then, either displays the color directly, if
running on >= 16 bit hardware, or, calls a FindNearestColor() function to convert
the color to the system palette.
I have made the initial mods in the 0.5pre1 release to support all of
this. That's the difference between a COLORVAL and PIXELVAL.
Greg