Path: utzoo!attcan!uunet!cs.utexas.edu!usc!apple!well!svc From: svc@well.UUCP (Leonard Rosenthol) Newsgroups: comp.sys.mac.programmer Subject: Re: QuickDraw/TextEdit question Summary: That's not a bug, that's a feature Message-ID: <12564@well.UUCP> Date: 4 Jul 89 17:27:22 GMT References: <3705@lindy.Stanford.EDU> Lines: 43 In article <3705@lindy.Stanford.EDU>, philf@lindy.Stanford.EDU (Phil Fernandez) writes: > > Hopefully someone can explain the following to me, and offer a solution. > > [discussion of use of offscreen BM] > [problem overlaying a TextEdit Rect over a nifty bitmap] > > I find that TextEdit blanks the each line into which I enter text. > That is, if I start type into the first line of the TextEdit rect, > that entire line is cleared to white, wiping out the background image > I had placed there. > > Similarly, as I move down to subsequent lines, the full line is > blanked as soon as I enter the line. > > Can anyone explain what's going on here? Am I being dumb, or is this > some fact of life that I have to work around? Any help would be appreciated. > Guess what?? You've found one of the better FEATURES in TextEdit. It really is a feature and NOT a bug. If you disassemble TE (one of my more favorite hobbies :-) you will see that TEKey does an EraseRect from cursorPos to the end of the line (and depending of teSysJust that can either wipe left-> right or right->left). Why does TE do an eraseRect?? It is my understanding that the reason for this is that it makes doing text insertion/wrap much easier than the standard method of simply shifting everyting over with CopyBits. It is also one of the reasons why TE is SO SLOW...EraseRect for EVERY char!! However, given the age of TE, what do you expect?? The only solution that I can offer you, off hand, is to keep the TERect offscreen, and then TEUpdate into the main port. If the penMode and copyMode are correct when Updating you may be able to get away with out the white (since that only happens during text entry). You might also want to write your own TE, but that might be a bit more than you are looking for, eh?? Hope that helps.. -- +--------------------------------------------------+ Leonard Rosenthol | GEnie : MACgician Lazerware, inc. | MacNet: MACgician UUCP: svc@well.UUCP | ALink : D0025