Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!apple!well!smoke From: smoke@well.sf.ca.us (Nicholas Jackiw) Newsgroups: comp.sys.mac.programmer Subject: Re: Offscreen Bitmap help needed...! Message-ID: <21100@well.sf.ca.us> Date: 9 Oct 90 17:43:04 GMT References: Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 35 In article es1o+@andrew.cmu.edu (Eric Mitchell Snider) writes: > >Anyway, now I'd like to have an offscreen bitmap that is larger >than the size of my window. It seems that my PICT is getting clipped >(?) to the size of the window. When I do a Copybits from offscreen to >the screen everything comes out ok except for when I copy from a part of >the PICT that wouldn't have fit in the window. (Maybe the PICT is >getting clipped to the visrgn of the window?) Right. I assume you allocate your offscreen drawing stuff as a bitmap, and then, to draw it, do a SetPortBits(myOffBits). Note the meaning of this call--it changes the bits to which drawings in the current port are imaged. You haven't changed the port, however, so all of the port-specific attributes, such as the visRgn, clipRgn, pen mode/ face/size/origin, etc., are applied to offscreen drawing. In your case, you probably don't want any of these attributes. The thing to do then is to create a separate GrafPort to refer to your (separate) offscreen bits.Alternately, you can stash the current port's parameters some place and swap in your own drawing attributes temporarily. The former method may take up a bit more memory, but it affords you the ease of coding SetPort(offWorld); draw; SetPort(myWindow); draw; and so on. You might also want to look into the 32-bit Quickdraw gWorld calls. More arcana to master, and they make you dependent on 32BCQD, but you stand to gain tremendous performance advantages from Quickdraw accelerators. -- --- * --- Nicholas Jackiw Smoke@well.sf.ca.us | Jackiw@cs.swarthmore.edu Key Curriculum Press, Inc. Applelink: D3970 | (415) 548-2304 --- * ---