ADC Home > Reference Library > Technical Q&As > Graphics & Imaging > Carbon >

CalcCMask and SeedCFill in Carbon

Q: My pre-Carbon code makes extensive use of CalcCMask and SeedCFill, which produce 1-bit deep masks. I currently call OpenPort and pass the port's BitMap to CalcCMask and SeedCFill, but OpenPort isn't supported in Carbon and its replacement, CreateNewPort, creates a CGrafPort with a PixMap. What should I pass as the dstBits parameter?

A: Create a 1-bit deep GWorld and pass in its PixMap using GetPortBitMapForCopyBits. QuickDraw calls that used to expect a GrafPort (or BitMap) have been modified to accept a 1-bit deep GWorld (or PixMap).

[Nov 08 2000]

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.