home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / mac / programm / 18066 < prev    next >
Encoding:
Text File  |  1992-11-07  |  1.3 KB  |  48 lines

  1. Organization: Senior, Electrical and Computer Engineering, Carnegie Mellon, Pittsburgh, PA
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!andrew.cmu.edu!jf3c+
  3. Newsgroups: comp.sys.mac.programmer
  4. Message-ID: <QeyRNC_00WBMQ9JI8O@andrew.cmu.edu>
  5. Date: Thu,  5 Nov 1992 21:19:58 -0500 
  6. From: "John A. Fedak" <jf3c+@andrew.cmu.edu>
  7. Subject: Copybits/Offscreen drawing...
  8. Lines: 38
  9.  
  10. yo,
  11.  
  12. OK I've stared a this long enough, what am I doing wrong?
  13. It's going to be a simple little animation routine.  I'm attempting
  14. to draw offscreen to speed things up a little.
  15.  
  16. I'm not getting any results (i.e. blank window).  I guess I should
  17. be glad it's not crashing.
  18.  
  19. ----
  20.  GDHandle     currDevice;
  21.     GWorldPtr    newWorld,currPort,oldPort;
  22.     PixMapHandle newMap;
  23.  
  24.     GetGWorld(&currPort,&currDevice);
  25.     
  26.     NewGWorld(&newWorld,0,&mainBounds,0,0,0);
  27.     newMap = GetGWorldPixMap(newWorld);
  28.     LockPixels(newMap); 
  29.     
  30.  SetGWorld(newWorld,currDevice);
  31.  
  32.   /* Draw Stuff Here */
  33.  
  34.     CopyBits(newWorld->portPixMap,currPort->portPixMap,
  35.              &newWorld->portRect  ,&currPort->portRect  ,srcCopy,0);         
  36.                                       
  37.     UnlockPixels(newMap); 
  38.     SetGWorld(currPort,currDevice);
  39.     DisposeGWorld(newWorld);
  40.  
  41. ----
  42.  
  43.  
  44. Thanks in advance,
  45.  
  46. Feds
  47.  
  48.