Re: Strange behaviour / Possible Bug with GC Function
- From: Havoc Pennington <hp redhat com>
- To: Colin Thomas <colin designresources co uk>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Strange behaviour / Possible Bug with GC Function
- Date: 13 Mar 2001 17:05:31 -0500
Colin Thomas <colin designresources co uk> writes:
I am running with gtk+ 1.2.8 on a Solaris platform.
I have the requirement to draw to a window various shapes, and when
overlapping to show the overlaps.
I have a pixmap which I draw to a window.
I have located the GDK_FUNCTION associated with the graphics context,
i.e. GDK_COPY , GDK_AND GDK_OR etc etc .
The GDK_OR gives me the ability to see overlapping shapes, but I seem
to get some strange behaviour. For example when I draw a green rectangle
it always paints as BLUE ?? (When I remove the call seting GDK_OR, Green
appears agains, but I look the overlapping).
I don't understand what you want to happen - if you don't want green,
which is the only color you've provided explicitly, what color do you
want? Blue seems as rational as anything else, maybe you want the
function GDK_READ_MY_MIND_AND_PICK_NICE_COLOR? ;-)
Anyway, the graphics functions define how the GC foreground pixel will
be combined with the GC background pixel, on a bitwise level.
The resulting color is pretty much totally undefined. GDK_XOR will
normally produce a contrasting color, and has the property that
drawing the same thing twice "undraws" the result of the first draw,
so it's the only GdkFunction anyone ever uses. Though even GDK_XOR is
pretty useless.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]