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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.