Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!bu.edu!dartvax!eleazar.dartmouth.edu!llama From: llama@eleazar.dartmouth.edu (Joe Francis) Newsgroups: comp.sys.mac.programmer Subject: Re: Drawstring Problem Message-ID: <25480@dartvax.Dartmouth.EDU> Date: 1 Nov 90 16:05:20 GMT References: Sender: news@dartvax.Dartmouth.EDU Organization: Dartmouth College, Hanover, NH Lines: 29 Steve Christensen writes: >- that whatever's behind the string gets erased each time. Another way to do >- this is to draw the string in XOR mode and then draw it again (to erase it) >- just before updating the display. This way is better if something's drawn >- "behind" the string... >- Charles H. Sampson responds: > Redrawing in XOR mode will erase the previously drawn text, but it >won't refresh whatever was "behind" the string. When the new text is >drawn the background will have holes where the old text was. However, >for the simple problem, where no background is involved, this looks like >the nicest solution; you don't have to worry about figuring out how to >handle the tail of the old text, as would be necessary if SrcCopy mode >were used. Actually, if you look again at what Steve wrote, you will find this is not true. Steve says to do both the drawing and "redrawing" (erasing) in XOR. This WILL refresh whatever was behind the string, at the expense of the text being white instead of black at those pixels where the background was black. Great for text on white or black backgrounds. Lousy for medium or small text over a grey pattern. ---------------------------------------------------------------------------- "Read My Lips: No Nude Texans!" - George Bush clearing up a misunderstanding