Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 4 - Color QuickDraw / Color QuickDraw Reference


Application-Defined Routine

You can customize the SeedCFill and CalcCMask procedures by writing your own color search function. For example, you might wish to use your own color search function to make SeedCFill 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. The CalcCMask 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 the CopyBits, CopyMask, and CopyDeepMask 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 the RGBColor 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 the seedRGB 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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996