home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!hal.com!decwrl!sdd.hp.com!cs.utexas.edu!oakhill!jolt.sps.mot.com!user
- From: Jim_Holt@aprdlgtr.sps.mot.com (Jim Holt)
- Newsgroups: comp.sys.mac.programmer
- Subject: GWorlds with B&W Macs
- Message-ID: <Jim_Holt-010992093710@jolt.sps.mot.com>
- Date: 1 Sep 92 14:44:44 GMT
- Sender: news@oakhill.sps.mot.com
- Followup-To: comp.sys.mac.programmer
- Organization: Motorola
- Lines: 54
- Nntp-Posting-Host: 222.20.248.206
-
- I read in Inside Mac volume 6 that under system 7.0 GWorlds were available
- on Black & White Macs. However, I have been unsuccessful with getting them
- to work on my Mac Plus with System 7.0 and Tuner 1.1.1 . The following
- code frag works fine under black & white on my MacIIci but goes to never
- land on the Plus.
-
- Has anyone gotten GWorlds to work on a Mac Plus ?
-
- /*-------------------------------*/
-
- PicHandle tempPic;
- GrafPtr savePort;
- GDHandle saveGD;
- QDErr err;
- GWorldPtr tempGWorld;
- Rect tempRect;
-
- /** Save info about current GWorld **/
-
- GetGWorld (&savePort, &saveGD);
-
- /** Read a Pict resource in and set up a GWorld**/
-
- tempPic = GetPicture(SOME_PICT_ID);
-
- if (tempPic)
- {
- tempRect = (*tempPic)->picFrame;
-
- /** Make an offscreen GWorld **/
-
- err = NewGWorld (&tempGWorld, 0, &tempRect, nil, nil, 0);
- if (err) return(err);
- SetGWorld (tempGWorld, nil);
-
- /********* program goes away on the following call !! ************/
-
- DrawPicture(tempPic,&tempRect);
- ReleaseResource((Handle) tempPic);
- }
- else return(PICT_NOT_FOUND_ERR);
-
- /* rest of code deleted */
-
-
-
- Any help would be very appreciated !
-
- +-------------------------------------------------------------------------+
- | I used to have a catchy signature, but I forgot what it was ... |
- | |
- | Jim Holt |
- | Motorola, Inc Jim_Holt@aprdlgtr.sps.mot.com |
- +-------------------------------------------------------------------------+
-