What Is Quartz (or Why Can't Windows Do That)by Matthew Russell
- Quartz is the heart and soul of Mac OS X's graphics layer, which directly supports the defining features of the Aqua desktop experience. Quartz is largely based upon Adobe's PDF specification, but it has roots tracing all the way back to PostScript. The two defining components of Quartz are Quartz Compositor and Quartz 2D. Quartz Compositor is OS X's powerful window server, and Quartz 2D is the two-dimensional drawing engine that's often referred to as Core Graphics. Although Quartz 2D is accessible through the Application Services umbrella framework, Tiger introduced Quartz Composer: an alternative way to explore the power of Quartz through a powerful visual programming environment.
In this article:
- And Out of the PostScript Came Quartz
- Quartz Compositor and Quartz 2D
- Visual Programming with Quartz Composer
- Universal Access Freebies
Showing off the bells and whistles of Mac OS X's user interface is one way of responding to the "What's so great about a Mac?" question that comes our way every now and then. The next time you get put on the spot, just minimize a video that's playing a few times with the genie effect, and then follow up with some puffs of smoke by removing icons from the dock. By the time you've replaced the icons and are getting back to your work via an elegant exposé transition, you're likely to hear a grumble that indicates you should hand over the keyboard for a little while. That's when you move into a guest account with a fast user switch to let your inquisitive friend do a little exploring. (But as you do the fast user switch, pretend that you didn't notice the amazing cube rotation that just took place.)
Or if you don't feel like showing off, you could just say "Quartz" and be done with it.
In the early 1980s, Adobe had just been founded and was developing a cutting-edge technology called PostScript. At the time, PostScript was a huge innovation, because instead of specifying how an already rendered image should appear, it specified how the image should be rendered for display. Although the difference might seem subtle, it would soon revolutionize the printing industry and eventually be applied to on-screen imaging.
In 1985, Apple's LaserWriter became the first laser printer on the market to ship with PostScript, and along with Aldus Pagemaker and the Macintosh, it spawned the desktop publishing revolution. Although PostScript went on to dominate the realm of printed media, NeXT realized that PostScript's power was only being partially realized and worked closely with Adobe to produce a variant of PostScript called Display PostScript for on-screen display. The concept of using PostScript to draw on the screen eventually became known as the digital paper metaphor, and NeXT used it extensively in its NeXTSTEP operating system.
After Apple acquired NeXT, the digital paper metaphor played a paramount role in the development of Mac OS X. But while the abstraction remained the same, Adobe's PDF specification (an enhanced subset of PostScript) was chosen as the primary foundation, instead of PostScript itself. Eventually, all of the hard work paid off and Apple introduced Quartz--the heart and soul of OS X's graphics layer, which so distinctively defines OS X.
Although Quartz is a catch-all phrase referring to the graphics layer that sits on top of Darwin, it really encompasses two distinct, but closely related, components: a window server called Quartz Compositor and a graphics library called Quartz 2D. The Mac OS X Technology Overview and Introduction to Quartz 2D Programming Guide provide two complementary views of how these components fit into the overall graphics architecture.
Two complementary views of how Quartz Compositor and Quartz 2D fit into the overall Mac OS X graphics architecture. (Most of the Quartz 2D API is exposed in the Core Graphics framework.)