Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!ucbvax!decwrl!sgi!mtoy From: mtoy@xman.SGI.COM (Michael Toy -- The S.G.I. XMAN) Newsgroups: comp.windows.x Subject: Re: inverting areas Summary: don't XOR, redraw Message-ID: <15077@sgi.SGI.COM> Date: 20 May 88 17:16:40 GMT References: <324@piring.cwi.nl> Sender: daemon@sgi.SGI.COM Organization: Silicon Graphics Inc, Mountain View, CA Lines: 24 XOR is not my idea of a good way to highlight (or "invert" an area). Consider a not-at-all-hypothetical machine which has a lot of horsepower dedicated to graphics operations. Almost any graphics operations happens "instantly", text, lines, rects, fills, you can draw these things 10,000's of times a second. In order to get this performance, this machine is designed so that the frame buffer memory is not on the CPU memory bus, making the READ/XOR/WRITE time quite slow (in comparison to the time to draw things). 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. (( ok, I'll fess up, the machine in question is the S.G.I. machine, which I freely admit to having in my office. In fact, I even work at S.G.I. In fact, I'm the server implementor at S.G.I. so I guess you have to take my opinion about "the way things should be done" with a grain of salt. )) -- "The programmer, like the poet, works only slightly removed from pure thought- stuff. He builds his castles in the air, from air, creating by exertion of the imagination." -- Frederick P. Brooks, Jr. "The Mythical Man Month" "Yeah, (*burp*), what he said." -- Michael Toy, the XMAN at Silicon Graphics {ames,decwrl,sun}!sgi!mtoy