home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 21253 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.5 KB  |  49 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!charon.amdahl.com!netcomsv!netcomsv!dms!petrick
  3. From: petrick@dms.agames.com (Jim Petrick)
  4. Subject: SeedCFill anyone?
  5. Message-ID: <1993Jan12.042937.28156@dms.agames.com>
  6. Organization: Atari Games Corporation
  7. References: <880840m.29.726366713@axe.acadiau.ca> <1993Jan12.040047.28035@dms.agames.com>
  8. Date: Tue, 12 Jan 1993 04:29:37 GMT
  9. Lines: 38
  10.  
  11. I'm trying to use SeedCFill to implement a paint-bucket fill tool for my
  12. drawing program, but I'm using PixMaps instead of BitMaps.  The relevent code
  13. looks something like this:
  14.  
  15.     PixMapHandle    srcMap, dstMap;
  16.     Rect        tRect        = { 0,0, 512,640 };
  17.     Point        start        = { 25, 25 };
  18.     GWorldPtr    sourceWorld, 
  19.             scratchWorld;
  20.  
  21.     // ... some code before here ...
  22.  
  23.     srcMap = GetGWorldPixMap( sourceWorld );    // 8-bit world (640x512)
  24.     dstMap = GetGWorldPixMap( scratchWorld );    // 1-bit world (640x512)
  25.  
  26.     LockPixels( srcMap );    // Not sure if needed, but can't hurt.
  27.     LockPixels( dstMap );
  28.     
  29.     //    May not be needed.
  30.     SetGWorld( scratchWorld, GetGWorldDevice(scratchWorld) );
  31.  
  32.     SeedCFill( (BitMap *)*srcMap, (BitMap *)*dstMap, &tRect, &tRect,
  33.         start.h, start.v, nil, 0L );
  34.  
  35.     // ... the rest of the code.
  36.  
  37.  
  38. The Mac crashes in the SeedCFill routine.  Any ideas of what's wrong here?
  39. Inside Mac wasn't the clearest on how the parameters should be used.
  40.  
  41.     -- jim
  42.  
  43.  
  44.     
  45. -- 
  46. ===========================================================================
  47. Atari Games Corp.                            -- jim petrick
  48. Milpitas, Ca                                    petrick@agcvax.agames.com
  49.