Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!agate!apple!apple.com!parent From: parent@apple.com (Sean Parent) Newsgroups: comp.sys.mac.programmer Subject: Re: Meaning of visRgn in offscreen bitmaps + whinings about PrintManager. Message-ID: <3801@internal.Apple.COM> Date: 23 Aug 89 00:03:00 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 58 References:<22321@andante.UUCP> <30755@ucbvax.BERKELEY.EDU> <34168@apple.Apple.COM> <1336@speedy.mcnc.org> <3733@internal.Apple.COM> <1342@speedy.mcnc.org> In article <1342@speedy.mcnc.org> kk@mcnc.org (Krzysztof Kozminski) writes: > Then how come that the following: > > OpenPort(&offBitsPort); > > ... initialize it to be exactly the size of a LaserWriter page ... > > SetPort(&offBitsPort); > FillRect(&offBitsPort.portRect,gray); > PrOpenPage(ThePrintPort,NULL); > CopyBits(&offBitsPort.portBits,&ThePrintPort->gPort.portBits > ,&offBitsPort.portRect,&offBitsPort.portRect,srcCopy,NULL ); > PrClosePage(ThePrintPort); > > Results in a printout *clipped to visRgn* ????? You are right, myself and InsideMac are wrong, the visRgn is obeyed on off screen bitmaps. > Also: how come a page-sized bit map (filled gray) prints on a LW in ~9 > seconds at 100% scale, ~50 seconds at 50%, and ~80 sec at 25%? > Shouldn't the ratios be more like 1 : 4 : 16 ? Why is it so damn slow > anyway ? I'd think that just dumping a bitmap is the fastest thing > that can be done (is it communications problem or what? Even at 25%, > the LW page is < 1Mbyte - should transfer real fast) I believe that the ratios are odd because of the overhead involved in scalling the image. At 100% you have a lot of scaling to do and very little data, 50% you have 4 times as much data and less scaling, 25% much more data but no scaling. This is just a guess, I am not a PostScript person. BitMaps are slow because they are sent as Hex data as required by PostScript. In the 7.0 architecture there will be specific drivers so Binary data can be sent to printers that can support it. > Also: how come that doing this CopyBits in chunks < 3.5kBytes (I know, it > isn't really necessary) is THREE times slower than doing it in one huge piece? The only reason I can think of for this is that the PostScript has a large overhead on the image operator. There are some improvements that can be made for the 7.0 architecture here also. > Finally: am I the only person who thinks that saying in the Inside Mac, > vol. 2, something to the effect "you draw to a printing port just as if > it was a screen" just to follow it 3 pages later with making 95% of > really useful QuickDraw calls (transfer modes & region operations) > invalid on a LaserWriter is, well, inconsistent? Does anybody has a > good method of doing 'patOr' on an LW short of drawing into your own > off-screen port and then CopyBiting it? PostScript does not have the concept of transfer modes. PostScript also does not have anything like regions. Solutions to these problems are being looked into. One of the goals of the 7.0 architecture is to build a consistent printing platform. Sean Parent