Re: About Xlib



Thus spake Blue Zhao:
>
> I use XGetImage to get the image of a specified window or just the
> desktop as xwd would do. But When I use XPutImage to put it onto a
> window, it fails when the image is multivis (for example the image
> gotten on Solaris U10 when Netscape is running. It works properly on
> Linux, U5 and U10 without Netscape is running). It displays: "BadMatch
> (Invalid parameter attributes)." I think I have changed the image I
> get using XGetImage to proper format. I compare it with the image
> generated by xwud just before it be put to a window.
>

It's been a while since I had to do any Xlib programming (thankfully),
but BadMatch ususally indicates that your drawable has the wrong depth.
I can't remember if you specify the depth in the Graphics Context or
when you create the drawable.

As for good Xlib references, the only one I can recommend is Volume One
of the O'Reilly X series. It's heavygoing if you read it from cover to
cover, but I found it quite rewarding. A bit like learning assembler
after you've learnt C ...

Chris





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