Path: utzoo!attcan!uunet!mcvax!guido From: guido@cwi.nl (Guido van Rossum) Newsgroups: comp.windows.x Subject: Re: inverting areas Message-ID: <331@piring.cwi.nl> Date: 21 May 88 19:15:34 GMT References: <324@piring.cwi.nl> <15077@sgi.SGI.COM> Reply-To: guido@cwi.nl (Guido van Rossum) Organization: The Royal Society for Prevention of Cruelty to Amoebae Lines: 27 Michael Toy -- The S.G.I. XMAN writes: >XOR is not my idea of a good way to highlight (or "invert" an area). >... >On this architecture, it is much faster to invert an object by drawing >again with the "foreground" and "background" colors switched than it is >to do an XOR. Yes. But redrawing with changed background is also not a good way to highlight or "invert" an area. On some architectures redrawing with different fg/bg colors is slower than XOR-ing some bit planes, on other architectures it is slower. What have we learned? It depends. It is unavoidable that some programs will perform sub-optimal on some architectures (although most programs perform sub-optimal on all architectures :-). Is your SGI architecture also slow at copying pixmaps around on the screen? This is another operation where the source is already in the frame buffer. I believe it is quite an essential assumption of the X design (in fact of any window system's design) that such operations are fast, so moving windows around is fast. Returning to XOR, maybe this can be recognized as an important graphics operation and the primitives for XOR-ing bit planes in-place built in the hardware... -- Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam guido@piring.cwi.nl or mcvax!piring!guido or guido%piring.cwi.nl@uunet.uu.net