Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mcnc!kk From: kk@mcnc.org (Krzysztof Kozminski) Newsgroups: comp.sys.mac.programmer Subject: Meaning of visRgn in offscreen bitmaps + whinings about PrintManager. Message-ID: <1342@speedy.mcnc.org> Date: 22 Aug 89 13:38:15 GMT References: <22321@andante.UUCP> <30755@ucbvax.BERKELEY.EDU> <34168@apple.Apple.COM> <1336@speedy.mcnc.org> <3733@internal.Apple.COM> Reply-To: kk@mcnc.org.UUCP (Krzysztof Kozminski) Organization: Microelectronics Center of NC; RTP, NC Lines: 52 In article <3733@internal.Apple.COM> parent@apple.com (Sean Parent) writes: >In article <1336@speedy.mcnc.org> kk@mcnc.org (Krzysztof Kozminski) writes: >>As far as I can tell, IM is not correct: drawing does get clipped to visRgn. >>I have fresh a recollection of creating an off-screen bitmap to produce image >>for printing and doing CopyBits to the printer port just to find out that >>I was getting 640x480 pixel image ... > >Inside Mac is correct. Drawing does not get clipped to visRgn on an off >screen Bit/PixMap with one exception. StdBits (not CopyBits) will obey the >visRgn. > >Sean Parent 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* ????? 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? 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) All the above times on a Mac II with 5 Mbytes of RAM and lots of disk space and LW II NT, with graphics smoothing OFF and precision bitmap alignment ON. 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? KK -- "The party was a masquerade; the guests were all wearing their faces."