<div dir="ltr">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.<br>
I hope i'm clear enough, else i'll try to simplify my program to post it here when i have time.<br><br><div class="gmail_quote">2008/8/7 Vincent Torri <span dir="ltr"><<a href="mailto:vtorri@univ-evry.fr">vtorri@univ-evry.fr</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hey,<div><div></div><div class="Wj3C7c"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I started few days ago a gui creation with Xlib, but i found xcb yesterday<br>
and decided try it. I modified my code quiet easily (it wasn't really long)<br>
except for the color. How should i replace<br>
XAllocColor(WinInf->dpy, WinInf->cmap, &c);<br>
XSetForeground(WinInf->dpy, WinInf->gc, c.pixel);<br>
<br>
I tried by using xcb_alloc_color but i didn't succeed (all my drawings were<br>
black).<br>
<br>
Any idee?<br>
Else, is there a simple example just drawing colored points in an empty<br>
window?<br>
</blockquote>
<br></div></div>
see in demo/ the code of 'julia.c'<br><font color="#888888">
<br>
Vincent<br>
</font></blockquote></div><br></div>