[Xcb] dealing with colors
jloupdef at gmail.com
Thu Aug 7 07:13:11 PDT 2008
the code of julia.c doesn't help me because it use XCBImagePutPixel and the
color is directly given in parameter, but I'm drawing directly in the window
using xcb_poly_segment, xcb_poly_point... and the color can't be given
directly. That's why i'm looking to a function corresponding to
XSetForeground to select the color i want.
I hope i'm clear enough, else i'll try to simplify my program to post it
here when i have time.
2008/8/7 Vincent Torri <vtorri at univ-evry.fr>
> I started few days ago a gui creation with Xlib, but i found xcb yesterday
>> and decided try it. I modified my code quiet easily (it wasn't really
>> except for the color. How should i replace
>> XAllocColor(WinInf->dpy, WinInf->cmap, &c);
>> XSetForeground(WinInf->dpy, WinInf->gc, c.pixel);
>> I tried by using xcb_alloc_color but i didn't succeed (all my drawings
>> Any idee?
>> Else, is there a simple example just drawing colored points in an empty
> see in demo/ the code of 'julia.c'
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Xcb