Important: The information in this document is obsolete and should not be used for new development.
SeedCFillTo determine how far filling will extend to pixels matching the color of a particular pixel, use the
PROCEDURE SeedCFill (srcBits,dstBits: BitMap; srcRect,dstRect: Rect; seedH,seedV: Integer; matchProc: ProcPtr; matchData: LongInt);
- The source image. If the image is in a pixel map, you must coerce its
PixMaprecord to a
- The destination mask.
- The rectangle of the source image.
- The rectangle of the destination image.
- The horizontal position of the seed point.
- The vertical position of the seed point.
- An optional color search function.
- Data for the optional color search function.
SeedCFillprocedure generates a mask showing where the pixels in an image can be filled from a starting point, like the paint pouring from the MacPaint paint-bucket tool. The
SeedCFillprocedure returns this mask in the
dstBitsparameter. This mask is a bitmap filled with 1's to indicate all pixels adjacent to a seed point whose colors do not exactly match the
RGBColorrecord for the pixel at the seed point. You can then use this mask with the
You specify a source image in the
srcBitsparameter, and in the
srcRectparameter you specify a rectangle within that source image. You specify where to begin seeding in the
seedVparameters, which must be the horizontal and vertical coordinates of a point in the local coordinate system of the source bitmap. By default, the 1's returned in the mask indicate all pixels adjacent to the seed point whose pixel values do not exactly match the pixel value of the pixel at the seed point. To use this default, set the
matchDataparameters to 0.
In generating the mask,
CopyBitsprocedure to convert the source image to a 1-bit mask. The
SeedCFillprocedure installs a default color search function that returns 0 if the pixel value matches that of the seed point; all other pixel values return 1's.
SeedCFillprocedure does not scale: the source and destination rectangles must be the same size. Calls to
SeedCFillare not clipped to the current port and are not stored into QuickDraw pictures.
You can customize
SeedCFillby writing your own color search function and pointing to it in the
SeedCFillwill then use your procedure instead of the default. You can use the
matchDataparameter for whatever you'd like. In the
matchDataparameter, for instance, your application could pass the handle to a color table. Your color search function could then check whether the pixel value for the pixel currently under analysis matches any of the colors in the table.
SEE ALSOSee "Application-Defined Routine" on page 4-92 for a description of how to customize the