Important: The information in this document is obsolete and should not be used for new development.
SeedFillTo determine how far filling will extend from a seeding point, use the
PROCEDURE SeedFill (srcPtr,dstPtr:\xDDPtr; srcRow,dstRow,height,words, seedH,seedV:\xDDInteger);
- A pointer to the source bit image.
- On input, a pointer to the destination bit image; upon return, a pointer to the bitmap containing the resulting mask.
- Row width of the source bitmap.
- Row width of the destination bitmap.
- Height (in pixels) of the fill rectangle
- Width (in words) of the fill rectangle.
- The horizontal offset (in pixels) at which to begin filling the destination bit image.
- The vertical offset (in pixels) at which to begin filling the destination bit image.
SeedFillprocedure produces a mask showing where bits in an image can be filled from a starting point, like the paint pouring from the MacPaint paint-bucket tool. The
SeedFillreturns this mask in the
dstPtrparameter. This mask is a bitmap filled with 1's only where the pixels in the source image can be filled. This is illustrated in
Figure 3-24. You can then use this mask with the
Figure 3-24 A source image and its resulting mask produced by the
Point to the bit image you want to fill with the
srcPtrparameter, which can point to the image's base address or a word boundary within the image. Specify a pixel height and word width with the
wordsparameters to define a fill rectangle that delimits the area you want to fill. The fill rectangle can be the entire bit image or a subset of it. Point to a destination image with the
dstPtrparameter. Specify the row widths of the source and destination bitmaps (their
rowBytesvalues) with the
dstRowparameters. (The bitmaps can be different sizes, but they must be large enough to contain the fill rectangle at the origins specified by the
dstPtrparameters.) Figure 3-25 illustrates these parameters for the source and destination bit images.
You specify where to begin filling with the
seedVparameters: they specify a horizontal and vertical offset in pixels from the origin of the image pointed to by the
SeedFillprocedure calculates contiguous pixels from that point out to the boundaries of the fill rectangle, and it stores the result in the bit image pointed to by the
SeedFillare not clipped to the current port and are not stored into QuickDraw pictures.
Figure 3-25 Parameters for the
SEE ALSOFor color graphics ports, use the
SeedCFillprocedure, which is described in the chapter "Color QuickDraw."