Re: Drawing lines



On Wed, 25 Sep 2002, Olexiy Avramchenko wrote:

[snip]

You have a bug there:
1. here's what you do
gdk_draw_line((GdkDrawable*)drawing_area, ...);    /* *BUG* drawing_area
is GtkWidget, not GdkDrawable */
2. here's what you have to do:
gdk_draw_line(drawing_area->window, ...);    /* all's ok:
drawing_area->window is valid drawable */

Thanks, that works.  On the Amiga there were Viewports, Rastports,
Windows, and probably other windowing things I've forgotten, so I've got
to learn the connections here as well after many years of not doing any
graphics programming.

GdkGC has a field 'function'. You can change it via
gdk_gc_set_function(), so
gdk_gc_set_function(gc, GDK_XOR) is what you need.
gtk-doc/gdk/gdk-graphics-contexts.html#GDK-GC-SET-FUNCTION

Thanks, that's also helpful.

Regards,

Bryan


*---------------------------------------------------------------
* Bryan Brown      <*>              bbrown radix net
* http://www.radix.net/~bbrown
*---------------------------------------------------------------




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