XOR gc function



I have seen an annoying behavior with the XOR function. 
The outline of my code is something like this:

values = gdk_gc_get_values(widget->style->fg_gc[0]);
values.function = GDK_XOR;
xor_gc = gdk_gc_new_with_values(...,values,...);

gdk_gc_set_foreground(xor_gc, &red);

When I draw a line using xor_gc, sometimes it's red on a white background,
and green on a black background. 

BUT, when I start prefdm, things are inverted, green on white and red on
black. 

This is something that bothers me, because if I want to draw a xored black
line, sometimes it looks white and I can't see it on a white background.

This is also happening if I run the program on a PC and I use a Sun as
Xserver.

Can anybody explain to me what is the concept that I'm loosing?
(values.background, maybe?)
<ADRIAN>



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