Important: The information in this document is obsolete and should not be used for new development.
Application-Defined Routine
You can customize theSeedCFill
andCalcCMask
procedures by writing your own color search function. For example, you might wish to use your own color search function to makeSeedCFill
generate a mask that allows filling around pixels that approximate the color of your seed point, rather than match it exactly.The
SeedCFill
procedure 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. TheCalcCMask
procedure generates a mask showing where pixels in an image cannot be filled from any of the outer edges of a rectangle you specify. You can then use these masks with theCopyBits
,CopyMask
, andCopyDeepMask
procedures.By default,
SeedCFill
returns 1's in the mask to indicate all pixels adjacent to a seed point whose colors do not exactly match theRGBColor
record for the pixel at the seed point. By default,CalcCMask
returns 1's in the mask to indicate what pixels have the exact RGB value that you specify in theseedRGB
parameter, as well as which pixels are enclosed by shapes whose outlines consist entirely of pixels with this exact color. These procedures use a default color search function that matches exact colors.You can customize these procedures by writing your own color search function and pointing to it in the
matchProc
parameters to these procedures, which then use your procedure instead of the default.