Important: The information in this document is obsolete and should not be used for new development.
SeedFill
To determine how far filling will extend from a seeding point, use theSeedFill
procedure.
PROCEDURE SeedFill (srcPtr,dstPtr:\xDDPtr; srcRow,dstRow,height,words, seedH,seedV:\xDDInteger);
srcPtr
- A pointer to the source bit image.
dstPtr
- On input, a pointer to the destination bit image; upon return, a pointer to the bitmap containing the resulting mask.
srcRow
- Row width of the source bitmap.
dstRow
- Row width of the destination bitmap.
height
- Height (in pixels) of the fill rectangle
.
words
- Width (in words) of the fill rectangle.
seedH
- The horizontal offset (in pixels) at which to begin filling the destination bit image.
seedV
- The vertical offset (in pixels) at which to begin filling the destination bit image.
DESCRIPTION
TheSeedFill
procedure 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. TheSeedFill
returns this mask in thedstPtr
parameter. 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 theCopyBits
,CopyMask
, andCopyDeepMask
procedures.Figure 3-24 A source image and its resulting mask produced by the
SeedFill
procedure
Point to the bit image you want to fill with thesrcPtr
parameter, which can point to the image's base address or a word boundary within the image. Specify a pixel height and word width with theheight
andwords
parameters 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 thedstPtr
parameter. Specify the row widths of the source and destination bitmaps (theirrowBytes
values) with thesrcRow
anddstRow
parameters. (The bitmaps can be different sizes, but they must be large enough to contain the fill rectangle at the origins specified by thesrcPtr
anddstPtr
parameters.) Figure 3-25 illustrates these parameters for the source and destination bit images.You specify where to begin filling with the
seedH
andseedV
parameters: they specify a horizontal and vertical offset in pixels from the origin of the image pointed to by thesrcPtr
parameter. TheSeedFill
procedure 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 thedstPtr
parameter.Calls to
SeedFill
are not clipped to the current port and are not stored into QuickDraw pictures.Figure 3-25 Parameters for the
SeedFill
andCalcMask
proceduresSEE ALSO
For color graphics ports, use theSeedCFill
procedure, which is described in the chapter "Color QuickDraw."