gdk_gc_set_function() mystery
- From: mikecorn <mikecorn t-online de>
- To: gtk-app-devel-list gnome org
- Subject: gdk_gc_set_function() mystery
- Date: Wed, 20 Dec 2006 14:35:30 -0800 (PST)
I am having a problem with gdk_gc_set_function()
The following code draws black lines:
gdk_draw_line(dwin1->window,gdkgc,x2,y2,x2+pw,y2);
gdk_draw_line(dwin1->window,gdkgc,x2,y2,x2,y2+ph);
gdk_draw_line(dwin1->window,gdkgc,x2,y2+ph,x2+pw,y2+ph);
My wish is to replace the constant black lines with lines that invert
whatever color they are being drawn over.
I added gdk_gc_set_function() calls around the above code:
gdk_gc_set_function(gdkgc,GDK_INVERT);
gdk_draw_line(dwin1->window,gdkgc,x2,y2,x2+pw,y2);
gdk_draw_line(dwin1->window,gdkgc,x2,y2,x2,y2+ph);
gdk_draw_line(dwin1->window,gdkgc,x2,y2+ph,x2+pw,y2+ph);
gdk_gc_set_function(gdkgc,GDK_COPY);
The drawn lines are the inverse of the foreground color, not the
inverse of the replaced RGB pixels. I tried the other functions
and I never got anything but the foreground color (black) or its
inverse (white).
I must not be understanding something in the documentation.
Can someone please help?
thanks
--
View this message in context: http://www.nabble.com/gdk_gc_set_function%28%29-mystery-tf2862634.html#a7999334
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]