The following strategies are useful for revising QuickDraw applications to use Quartz:
Think differently, especially for those items that don’t have equivalent functionality in Quartz—such as arithmetic transfer modes, SeedCFill, SearchProcs—but that you still need to find a substitute for.
Focus on functionality, not functions. The approach of translating QuickDraw idioms into Quartz won’t work in most cases, especially for calls to CopyBits and the regions functions.
Analyze your use of regions to see what functionality each use provides. Then revise the code accordingly. You may have used regions for a variety of purposes; you’ll find alternative strategies throughout this guide. See “Regions Replacement Strategies.”
Analyze your CopyBits calls to see what functionality each call provides. Then revise the code accordingly. You probably used CopyBits and related functions to achieve a number of tasks in QuickDraw; you’ll find alternative strategies throughout this guide. See “CopyBits Replacement Strategies.”
Account for differences between the QuickDraw and Quartz coordinate systems. If you use HIView along with Quartz, make sure you are familiar with how HIView handles coordinates. See “Coordinate Space.”
Use alpha. It’s fully supported in Quartz. See The Alpha Value in Quartz 2D Programming Guide.
Convert PICT data to PDF and provide conversion support in your application to handle legacy PICT files that your users may need to open. See “Converting PICT Data.”
Support PDF data for Copy and Paste actions. Only PDF content fully captures Quartz drawing, and you’ll want to ensure fidelity of content. See “Converting PICT Data.”
Save and restore graphics states appropriately. See “Graphics State and Global Effects.”
Revise your hit testing code. See “Hit Testing.”
Think device independence and resolution independence. See “Drawing Destinations.”
Identify the shortcomings of your QuickDraw application to see where you can use new features of Quartz to improve your application.
Remove code that compensates for QuickDraw shortcomings. For example, XOR drawing isn’t needed by most applications that use Quartz. The GrafProcs bottleneck tricks simply don’t apply in Quartz.
Optimize your code to ensure that your application performs at its best. See “Performance.”
Last updated: 2006-09-05