home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!primerd.prime.com!j.cook
- From: j.cook@primerd.prime.com (C. James Cook)
- Subject: Re: Copybits/Offscreen drawing...
- Message-ID: <1992Nov7.142048@primerd.Prime.COM>
- Organization: Prime Computer R&D
- References: <QeyRNC_00WBMQ9JI8O@andrew.cmu.edu>
- Date: Sat, 7 Nov 1992 19:26:51 GMT
- Lines: 32
-
- "John A. Fedak" <jf3c+@andrew.cmu.edu> writes:
- > yo,
- >
- > OK I've stared a this long enough, what am I doing wrong?
- > It's going to be a simple little animation routine. I'm attempting
- > to draw offscreen to speed things up a little.
- >
- ...
- > NewGWorld(&newWorld,0,&mainBounds,0,0,0);
- > newMap = GetGWorldPixMap(newWorld);
- > LockPixels(newMap);
- >
- > SetGWorld(newWorld,currDevice);
- >
- > /* Draw Stuff Here */
- >
- > CopyBits(newWorld->portPixMap,currPort->portPixMap,
- > &newWorld->portRect ,&currPort->portRect ,srcCopy,0);
-
- 1. When you do a SetGWorld where the first argument is a GWorld, the second
- field (the device) should be 0 or NIL. The NewGWorld already created a
- device for you, you should use it when accessing your GWorld bitmap,
- and unlike "normal" ports, SetGWorld can figure out the GDevice from the
- port with GWorlds, so you supply zero.
-
- 2. When you do a CopyBits call, you want the current port to be set to the
- destination as used in the CopyBits call. It looks like it is set to
- the source (your GWorld).
-
- Good luck,
- Jim
-
-