Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!kddlab!atrpost!atr-la!alain From: alain@atr-la.atr.junet (Alain de Cheveigne) Newsgroups: comp.sys.mac.programmer Subject: Re: Help: Using CopyBits for Update Message-ID: <3063@atr-la.atr.junet> Date: 14 May 89 07:03:30 GMT References: <1617@neoucom.UUCP> <7254@hoptoad.uucp> <21931@santra.UUCP> <1203@speedy.mcnc.org> <7287@hoptoad.uucp> Organization: ATR International,Japan Lines: 40 In-reply-to: tim@hoptoad.uucp's message of 13 May 89 17:49:42 GMT Recently tim@hoptoad.UUCP (Tim Maroney) wrote: >Maybe I'm being dense, but what is the advantage to keeping an >offscreen bitmap in a terminal emulator and using it for updates? >Individual updates will go faster. However, you will spend more time >overall in QuickDraw, because what would ordinarily be a one-step >process has a new step added. There is one advantage in using an offscreen bitmap that has nothing to do with speed. Suppose you want your terminal emulator to print and scroll when it isn't frontmost. For example it's in the background, or you brought up a DA. Suppose the front window leaves an unmasked space at the top of the emulator window. If you just print to the window and scroll, then this portion will remain blank: text will appear to "slide under" the masking window, but won't come out at the top. However, if you print both to the screen and to an offscreen bitmap, and copy the bitmap back to the window at each newline, then the emulator will appear to scroll ok. Of course it's a bit slow on a Mac+. For speed you want to clip the CopyBits to the part that "slid out" from under the masker(s). You might also make special cases for when the drawing point is completely masked (draw only to the offscreen bitmap) or completely visible (draw only to the screen, and transfer each line to the offscreen buffer at newlines and each time something is about to mask it). I tried to send a mail to tim@hoptoad.UUCP, but the mailer doesn't know of domain UUCP. Alain de Cheveigne, alain@atr-la.atr.junet