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).
|