1.3. Graphics and Media Layers

Much of the user experience on Mac OS X is built around graphics. All the elements you see on the screen—windows, menus, buttons, text—are graphics. It comes as no surprise that Mac OS X has several subsystems dedicated to graphics, as shown in Figure 1-4.

Figure 1.4. Figure 1-4

Mac OS X provides a rich graphics library for doing two-dimensional drawing, called Quartz 2D. The Quartz 2D library is specific to Mac OS X, although it uses industry-standard graphic formats, such as PDF. Mac OS X also includes OpenGL for those interested in three-dimensional drawing. Although popularized by cross-platform video games, Mac OS X itself uses OpenGL for certain operations. Finally, QuickTime is built into Mac OS X, providing support for what Apple occasionally calls four-dimensional drawing. QuickTime is also available for Microsoft Windows operating systems, and for older versions of Mac OS. All these programming libraries rely on the Quartz Compositor for actually drawing their content.

The following sections look at these subsystems in more detail.

1.3.1. The Quartz Compositor

The Quartz Compositor is a private system service that oversees all graphics operations on Mac OS X. Apple does not provide a means for developers to interact with the Quartz Compositor directly, so we won't look at it in detail here. The Quartz Compositor plays such an important ...

Get Beginning Mac OS® X Programming 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.