Re: [gtk-list] XOR gc function




On Fri, 25 Jun 1999, Adrian Feiguin wrote:
> 
> 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.
> 

The exact effect of XOR depends on the foreground color. i.e. it XORs the
foreground into the background. Normally one uses a white foreground
color, I believe - white should work with nearly all background colors. In
particular it will be black on white and white on black.

Havoc




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