[Xcb] [Semi-off-topic] Few questions regarding X programming
Barton C Massey
bart at cs.pdx.edu
Fri Jan 18 19:46:10 PST 2008
In message <200801190304.32694.maximlevitsky at gmail.com> you wrote:
> But then the obvious question arises, how the X pixmaps are defined:
>
> I know that there are 3 formats:
>
> XYBitmap - mono 'bitmap'
> XYPixmap - Internet sources suggest that it holds all red values of pixels
> first, then all green values, and then the blue values - I will be glad to
> hear more about it, I am just curios.
>
> ZPixmap - normal image, each pixel holds color information, but my question
> is:
>
> Does ZPixmap hold RGB colors, or colormap indexes.
>
>
> If it holds RGB, then I probably will use the second method, I will
> preallocate few colors, and use them to fill backgrounds, draw rectangles,
> some decorations, and most drawing will be done using pixmaps.
> (Using MIT-SHM if available).
Pixmap formats don't really have anything to do with
colormaps. Both XYPixmap and ZPixmap are alternate ways of
representing arrays of pixels, which may be indexes into a
colormap or may be true color values. Don't use
XYPixmap---it's an anachronism and a mistake.
> Besides, all info about the bitmap formats is welcome.
> The X protocol spec seems to be sparse about it
See our new util/image library for an implementation of all
of it.
> 2) Can I ask more questions If I have them? :-)
You'll get better answers quicker on
xorg at lists.freedesktop.org.
Bart
More information about the Xcb
mailing list