Re: gtk drawing: simple layers



On Mon, 08 Apr 2002 14:00:26 -0400
Allin Cottrell <cottrell wfu edu> wrote:

I have a pixmap displayed in a gdk window.  Now I'd
like to superimpose a rectangle to give the user
feedback on the area she has selected with a mouse
drag -- a 'wire frame' rectangle that doesn't cover
up the pixmap.

Set the GC to XOR with gdk_gc_set_function (gc, GDK_XOR) and draw a white or
black line.

Draw it again on the same position to make it disappear again. :)

Roland
-- 
R.F. Smith                         "I have made this letter longer than usual
r s m i t h @ x s 4 a l l . n l     because I lack the time to make it shorter"
http://www.xs4all.nl/~rsmith/                             -- Blaise Pascal
I filter my mail. See http://www.xs4all.nl/~rsmith/spamblock.html for details.

Attachment: pgpILvtTWkhdc.pgp
Description: PGP signature



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