home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!charon.amdahl.com!netcomsv!netcomsv!dms!petrick
- From: petrick@dms.agames.com (Jim Petrick)
- Subject: SeedCFill anyone?
- Message-ID: <1993Jan12.042937.28156@dms.agames.com>
- Organization: Atari Games Corporation
- References: <880840m.29.726366713@axe.acadiau.ca> <1993Jan12.040047.28035@dms.agames.com>
- Date: Tue, 12 Jan 1993 04:29:37 GMT
- Lines: 38
-
- I'm trying to use SeedCFill to implement a paint-bucket fill tool for my
- drawing program, but I'm using PixMaps instead of BitMaps. The relevent code
- looks something like this:
-
- PixMapHandle srcMap, dstMap;
- Rect tRect = { 0,0, 512,640 };
- Point start = { 25, 25 };
- GWorldPtr sourceWorld,
- scratchWorld;
-
- // ... some code before here ...
-
- srcMap = GetGWorldPixMap( sourceWorld ); // 8-bit world (640x512)
- dstMap = GetGWorldPixMap( scratchWorld ); // 1-bit world (640x512)
-
- LockPixels( srcMap ); // Not sure if needed, but can't hurt.
- LockPixels( dstMap );
-
- // May not be needed.
- SetGWorld( scratchWorld, GetGWorldDevice(scratchWorld) );
-
- SeedCFill( (BitMap *)*srcMap, (BitMap *)*dstMap, &tRect, &tRect,
- start.h, start.v, nil, 0L );
-
- // ... the rest of the code.
-
-
- The Mac crashes in the SeedCFill routine. Any ideas of what's wrong here?
- Inside Mac wasn't the clearest on how the parameters should be used.
-
- -- jim
-
-
-
- --
- ===========================================================================
- Atari Games Corp. -- jim petrick
- Milpitas, Ca petrick@agcvax.agames.com
-