Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Printing Example Code Keywords: mac printing is a pain in the petute Message-ID: <6987@hoptoad.uucp> Date: 13 Apr 89 20:51:45 GMT References: <451@biar.UUCP> <28839@apple.Apple.COM> <4012@ece-csc.UUCP> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 32 In article <4012@ece-csc.UUCP> jnh@ece-csc.UUCP (Joseph Nathan Hall) writes: >Actually, I never thought printing was all that bad, especially if you go >to the trouble of keeping your displays in pictures ... Ever tried to print a large PICT file? You can't use the approach from the Tech Note, because installing your own QuickDraw bottleneck for GetPICTData will interfere with the Printing manager's bottlenecks. You have to draw into an offscreen bitmap and then draw that into the page port. What a pain. You can't even allocate a bitmap big enough in many cases, so you have to break the bitmap into bands and draw repeatedly into each band. And yes, the Print Manager is a mess overall. Fortunately, Apple does seem to realize this and will probably improve it some day. That's why they won't document what print drivers are supposed to do (and why Joel West's Palomar Software is doing such a good business in providing developers with print drivers....) >I dunno, this isn't >nearly as difficult as dealing with the low-level File Manager routines. >For example, if you want to read a text file, using the newline flag >(reported to exist and occasionally mentioned in the documentation)... Why would you want to do that? Can you say "slow"? Surely reading a text file in a block-by-block way is not beyond the skills of a professional programmer! Remember, the key to speed is to read in as much as possible into the largest buffer possible. If you follow this rule, the actual code calling the File Manager is nearly trivial. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "There are no Famous People on the net. Only some of us with bigger mouths than others." -- Dan'l Danehy-Oakes, The Roach