Re: [gtk-list] rubber banding lines - xorput?
- From: Trevor Johnson <trevor jpj net>
- To: John C Atkeson <jcatkeson juno com>
- cc: gtk-list redhat com
- Subject: Re: [gtk-list] rubber banding lines - xorput?
- Date: Sat, 20 Nov 1999 19:58:35 -0500 (EST)
> I'd also like my users to be able to draw lines rubber-band style, ie
> drag a line all around without obliterating background. Is there a
> xor-put in gtk?
>
> I've solved this low-level before, by saving all the pixels in a line's
> path to memory before plotting, but if there's something nicer I should
> use it...
Hi, John. Perhaps you could use gdk_draw_line, with the GdkFunction set
to GDK_XOR in the GdkGC. See:
<a href="
http://developer.gnome.org/doc/API/gdk/gdk-graphics-contexts.html#GDKFUNCTION
">GdkFunction</a>
<a href="
http://developer.gnome.org/doc/API/gdk/gdk-graphics-contexts.html#GDK-GC-SET-LINE-ATTRIBUTES
">gdk_gc_set_line_attributes</a>
<a href="
http://developer.gnome.org/doc/API/gdk/gdk-drawing-primitives.html#GDK-DRAW-LINE
">gdk_draw_line</a>
<a href="
http://developer.gnome.org/doc/API/gdk/gdk-graphics-contexts.html#GDKGC
">GdkGC</a>
__
Trevor Johnson
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]