Important: The information in this document is obsolete and should not be used for new development.
Application-Defined Routine
You can customize theSeedCFillandCalcCMaskprocedures by writing your own color search function. For example, you might wish to use your own color search function to makeSeedCFillgenerate a mask that allows filling around pixels that approximate the color of your seed point, rather than match it exactly.The
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. TheCalcCMaskprocedure 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, andCopyDeepMaskprocedures.By default,
SeedCFillreturns 1's in the mask to indicate all pixels adjacent to a seed point whose colors do not exactly match theRGBColorrecord for the pixel at the seed point. By default,CalcCMaskreturns 1's in the mask to indicate what pixels have the exact RGB value that you specify in theseedRGBparameter, 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
matchProcparameters to these procedures, which then use your procedure instead of the default.