[Xcb] dealing with colors

Vincent Torri vtorri at univ-evry.fr
Wed Aug 6 23:54:16 PDT 2008


> 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 long)
> 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 were
> black).
> Any idee?
> Else, is there a simple example just drawing colored points in an empty
> window?

see in demo/ the code of 'julia.c'


More information about the Xcb mailing list