[Xcb] XY pixmaps can't be displayed
Ian Osgood
iano at quirkster.com
Tue Feb 6 14:14:31 PST 2007
---------- Original Message ----------------------------------
From: Vincent Torri <vtorri at univ-evry.fr>
Date: Tue, 6 Feb 2007 10:39:06 +0100 (CET)
>
>Hey,
Hi Vincent!
>it's not a new news, but I would like that stuff to be fixed. First, I
>want to port xeyes to xcb, in order to use the shape extension. xeyes uses
>bitmaps. I've attached an archive that try to display one of the bitmap.
>
>I've written a function that mimic the XCreateBitmapFromData function, in
>order to display the bitmap. It seems that it does not work (nothing is
>drawn, on my computer)
You should look at the xcb/demo/neko program, where I created a version of
XCreateBitmapFromData (used for cursors and icons). It is factored in such a way
as to also emulate XCreatePixmapFromBitmapData (for tiling) using mostly the
same code.
There was a lot of padding and swapping needed to adapt to different server
endianness and non-factor-of-32 width images. The code was reverse-engineered
from the extremely hairy Xlib code. It would be great to have more than one
program to use this stuff, and pull it out into a utility library. Then again, these
days I don't think anything but legacy apps like xeyes use .bitmap files which are
#included directly into the source code.
>I would like to know if there's a bug in my program, first.
>
>then, according to the xcb_image code, as the bbp is 1, we just do a
>xcb_put_image of the data, with left_pad = 0, depth = 1 and the correct
>length of data, according to the Xlib code. Where can the bug be, in that
>part of the code ?
>
>thank you
>
>Vincent
Ian
More information about the Xcb
mailing list