Chapter 4. The Graphics Context

A Core Graphics drawing context, or CGContext, is the fundamental connection that Quartz 2D forges between your application and a graphics device. The system creates contexts for devices as diverse as an inexpensive black and white inkjet printers to a large, high resolution, color displays. In spite of the differences between the devices, the CGContexts provide a single drawing API that is common to both contexts. In most instances, your application need only concern itself with how to use this abstract drawing API and can leave the details of the underlying drawing destination to the system.

The graphics context is a central player in the Quartz 2D API and we spend quite some time in later chapters discussing specific ...

Get Quartz 2D Graphics for Mac OS X® Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.