Re: [gtk-list] Re: Drawing lines
- From: Federico Mena <federico nuclecu unam mx>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Drawing lines
- Date: Wed, 15 Apr 1998 14:38:13 -0500
>:Drawing the lines using Xor mode?
> ok, how?
You need to set the drawing function of a GC to GDK_XOR and use that
GC to paint. You can use gdk_gc_set_function() for that. Try
something like
GdkGC *gc;
GdkColor color;
gc = gdk_gc_new (my_window);
gdk_color_white (gdk_window_get_colormap (my_window), &color);
gdk_gc_set_foreground (gc, &color);
gdk_gc_set_function (gc, GDK_XOR);
gdk_draw_line (wheeeee);
gdk_gc_destroy (gc);
Of course you don't want to create and destroy a GC every time you paint
something, because that will be pretty expensive. You should create a
GC at startup and keep it around until you destroy the window.
Suggestion: get hold of some Xlib reference manual and read it. It
will make your life easier :-)
Quartic
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]