Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Version: 1.0

Posted: 2003-10-10

Build Requirements: N/A

Runtime Requirements: Carbon CodeWarrior Pro 5, Universal Headers 3.3.2, CarbonLib SDK 1.0.4

View Source Code:

Download Sample (“CalcCMaskCalcMask.zip”, 35.4K)
Download Sample (“CalcCMaskCalcMask.dmg”, 96.2K)



Description

This sample has been updated for the Carbon API. This snippet shows how to use both CalcCMask or CalcMask to create a mask given a source bitmap image. As decribed on pages IV-24 and V-72 of Inside Mac, the two routines compute a destination bitmap image with 1's only in the pixels where paint can not leak from any of the outer edges, This is similar to the lasso tool found in many drawing apps. Requirements: CodeWarrior Pro 5, Universal Headers 3.3.2, CarbonLib SDK 1.0.4 Keywords: CopyBits Mask CalcMask CalcCMask

Document Revision History

Date Notes
2003-10-10First Version

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.