Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: QuickDraw/TextEdit question Message-ID: <14190@dartvax.Dartmouth.EDU> Date: 4 Jul 89 06:45:07 GMT References: <3705@lindy.Stanford.EDU> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering Lines: 35 In article <3705@lindy.Stanford.EDU> philf@lindy.UUCP (Phil Fernandez) writes: > >Hopefully someone can explain the following to me, and offer a solution. > >My application prepares an off-screen bitmap, and draws a fairly >complex background image into it. Then, I open a window and use >CopyBits to copy the background image to the active window grafPort. ... >My problem comes when I overlay a TextEdit Rect on top of the image. ... >I find that TextEdit blanks the each line into which I enter text. ... >I checked the pen mode for my TERec -- it's srcOr, which in theory This is because TextEdit calls EraseRect before calling DrawText. The srcOr mode is ORing bits into a freshly erased background! Since TextEdit leaves text on a blank background on the screen, you might try calling CopyBits in srcOr mode to restore your background after you call TextEdit. If your text display is being updated in response to typed-in characters, then this solution might be somewhat less than aesthetic. If you are allowing selection of text, and Cut/Copy/Paste into your TERec, then things could get downright ugly with this solution. Depending on what you are trying to achieve, you might have to use QuickDraw directly to get the effect you want. Earle R. Horton "People forget how fast you did a job, but they remember how well you did it." Salada Tag Lines