Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!bcm!etaylor From: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Newsgroups: comp.windows.x Subject: Re: Window Managers Message-ID: <3055@gazette.bcm.tmc.edu> Date: 4 Dec 90 19:06:02 GMT References: <7422@castle.ed.ac.uk> Sender: usenet@bcm.tmc.edu Reply-To: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Organization: Baylor College of Medicine, Houston, Tx Lines: 30 Nntp-Posting-Host: wilkins.iaims.bcm.tmc.edu The general concept is that you draw a line using GXXor. You draw a line the first time and it inverts the colors beneath it. The draw the same line in exactly the same place again and the colors invert again giving you the original pixels. The GC for drawing this line is as follows : Pixel white = WhitePixel(dpy,screen) ; Pixel black = BlackPixel(dpy,screen) ; values.foreground = black ^ white ; values.background = white ; values.line_width = 0 ; values.function = GXxor ; values.plane_mask = values.foreground ; values.subwindow_mode = IncludeInferiors ; return XtGetGC(w, (unsigned long)GCForeground | (unsigned long)GCBackground | (unsigned long)GCLineWidth | (unsigned long)GCSubwindowMode | (unsigned long)GCPlaneMask | (unsigned long)GCFunction, &values); -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bcm.tmc.edu (713) 798-3776