Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!biar!trebor From: trebor@biar.UUCP (Robert J Woodhead) Newsgroups: comp.sys.mac.programmer Subject: Re: Offscreen pixmaps larger than screen Message-ID: <525@biar.UUCP> Date: 3 May 89 04:19:06 GMT References: <740@cogsci.ucsd.EDU> Reply-To: trebor@biar.UUCP (Robert J Woodhead) Organization: Biar Games, Inc. Lines: 31 In article <740@cogsci.ucsd.EDU> carrier@cogsci.UUCP (Mark Carrier) writes: >I've created an offscreen pixmap that is taller than one screen. I can't >figure out how to draw into the entire pixmap. When I try and fill the >entire offscreen pixmap with a single color, the painting gets clipped >to the upper screenful of the offscreen image. Your problem is that your visRgn region is set to be the visRgn of the original screen. Remember that everything is clipped to the intersection of portBits.bounds, portRect, the visRgn and the clipRgn; and that the visRgn starts out as a handle to a rectangular region coincident with screenBits.bounds, and clipRgn to a rect region -32767,-32767,32767, 32767. Try this: setport(yourPort); { set to your port } ClipRect(yourPort^.portRect); { set clipRgn to port size } CopyRgn(yourPort^.clipRgn,yourPort^.visRgn); { fix visRgn } or, if you don't want to change the clip region for some reason: RectRgn(yourPort^.visRgn,yourPort^.portRect); The first approach is preferable, especially if you are going to be generating pictures; you want the clipRgn as small as possible or you will have wierd problems when you copy the PICT into the clipboard and paste it into something, because the PICT takes its "size" cue from the clipRgn. -- Robert J Woodhead, Biar Games, Inc. !uunet!biar!trebor | trebor@biar.UUCP "The lamb will lie down with the lion, but the lamb won't get much sleep." -- Woody Allen.