Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!husc6!bloom-beacon!apple!parent From: parent@Apple.COM (Sean Parent) Newsgroups: comp.sys.mac.programmer Subject: Re: Text Drawing at speeds greater than 1200baud Summary: Direct operation on the screen Message-ID: <24608@apple.Apple.COM> Date: 23 Jan 89 20:07:31 GMT References: <2243@uokmax.UUCP> <27572@ucbvax.BERKELEY.EDU> <24307@apple.Apple.COM> <1728@helios.ee.lbl.gov> Organization: Apple Computer Inc., Cupertino, CA Lines: 23 In article <1728@helios.ee.lbl.gov>, beard@ux1.lbl.gov (Patrick C Beard) writes: > In article <24307@apple.Apple.COM> parent@Apple.COM (Sean Parent) writes: > >In article <27572@ucbvax.BERKELEY.EDU>, oster@dewey.soe.berkeley.edu (David Phillip Oster) writes: > >> (o) if and only if the destination is a 1-bit deep pixmap, completely > >> visible, the front window, and un-obscured by other windows, than do the > >> following ultra-fast code. Otherwise, use the DrawText solution you've > >> already been told about. > > > >There is no way to tell for sure that there are not any windows in front of > >your window. The system owns the screen. > > Not true. It is very easy. Just look at the visRgn of the window in > question. Clip your optimized drawing directly to the screen to this and > you won't get in trouble. I know, I've done it. It is dirty pool, but > it does work. Good observation. Make sure that you are looking at the whole visRgn and not just at the bounding rect (look out for holes in the rgn). This should work for must stuff today but I still wouldn't recommend it. If you are doing all this special casing why not use copybits. Then it will even work in the future garenteed. Sean