Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!uakari.primate.wisc.edu!indri!xanth!mcnc!kk From: kk@mcnc.org (Krzysztof Kozminski) Newsgroups: comp.sys.mac.programmer Subject: Re: Wide offscreen bitmap won't receive draw commands Message-ID: <1336@speedy.mcnc.org> Date: 21 Aug 89 14:17:02 GMT References: <22321@andante.UUCP> <30755@ucbvax.BERKELEY.EDU> <34168@apple.Apple.COM> Reply-To: kk@mcnc.org.UUCP (Krzysztof Kozminski) Organization: Microelectronics Center of NC; RTP, NC Lines: 31 In article <34168@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes: >In article <30755@ucbvax.BERKELEY.EDU> oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) writes: >>In article <22321@andante.UUCP> bwb@andante.UUCP (Bruce Ballard) writes: >>>What am I missing? One thing not mentioned by previous posters: be sure to do EraseRect on your entire off-screen bitmap before you start drawing (lack of this may account for the garbage you saw after drawing). If I remember correctly, the code given in TN129 (or is it 126?) has no provisions for cleaning the off-screen drawing area. >>Big off-screen grafports should probably do a: >> ClipRect(&thePort->portRect); The above is probably superfluous: the drawing gets clipped to portRect anyway. >> RectRgn(thePort->visRgn, &thePort->portRect); >>before drawing on it. > >Dave, I think that Bruce also read the line in Inside Mac, page I-149 that >says "The visRgn has no effect on images that aren't displayed on the screen." >I don't know if that warning is correct or not (...) 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 ... KK -- "The party was a masquerade; the guests were all wearing their faces."