Home > Articles > Home & Office Computing

From QuickDraw to Quartz 2D

The Quartz 2D library has a long legacy behind it and understanding that legacy may help you to recognize some of the idiosyncrasies of the library’s imaging model. Moreover, Quartz 2D is a single part in a larger graphics architecture on Mac OS X. This architecture was designed from its inception to take advantage of advances in the graphics hardware of modern personal computers. This chapter begins with a historical perspective of the Mac OS X graphics system and the evolution of technology behind Quartz 2D. It then explores crucial aspects of the graphics technology that is shaping the graphics architecture of the Macintosh.
This chapter is from the book

Before launching into an in-depth discussion of the features of Quartz 2D or a set of drawing techniques, this chapter begins by placing the library in context. The Quartz 2D library has a long legacy behind it and understanding that legacy may help you to recognize some of the idiosyncrasies of the library’s imaging model. Moreover, Quartz 2D is a single part in a larger graphics architecture on Mac OS X. This architecture was designed from its inception to take advantage of advances in the graphics hardware of modern personal computers. This chapter begins with a historical perspective of the Mac OS X graphics system and the evolution of technology behind Quartz 2D. We then explore crucial aspects of the graphics technology that is shaping the graphics architecture of the Macintosh.

The Legacy of QuickDraw and the Rise of PDF

The QuickDraw graphics library stands to this day as testament to the original Macintosh computer and its creators. The library was the fundamental technology that made the original Macintosh graphical user interface possible. QuickDraw was brought to life by the ingenuity and skill of software designers such as Bill Atkinson and Andy Herzfeld. Apple created QuickDraw in the late 1970’s and early 1980s, an era in which "real" computer graphics were the province of large, powerful mainframe computers, and personal computers were just making the transition from novelty to necessity.

QuickDraw had very modest beginnings. In various forms, the original code ran on computers like the Apple Lisa and the original Macintosh. The high resolution bitmapped displays of these computers was considered a revolution when compared to the character terminals of the previous computer generation. In spite of their sophistication, however, the computers could only display graphics in black and white.

QuickDraw was flexible enough to produce impressive graphics on both the screen and on printer. The library incorporated a number of revolutionary advances, features that were not found on personal computers prior to the Macintosh. Among these were the support for pixel regions, drawing operations that could be recorded into a meta-file (the infamous PICT file format), the ability to scale the drawings in a meta-file on playback, and drawing primitives for ovals, curves, and rounded rectangles.

The 9-inch black and white display of the original Macintosh quickly became a thing of the past. Computers evolved, as did the sophistication and requirements of applications and users. Apple evolved QuickDraw along with its computers. As displays became capable of reproducing millions of colors and two tone dot-matrix printers evolved into high-resolution, photo quality ink jet printers, QuickDraw both kept up the pace and pushed the envelope of graphics evolution. The era of QuickDraw ended, however, when Apple deprecated the technology in Mac OS X 10.4 Tiger. The QuickDraw library came of age as an important building block for vital graphics technologies like QuickTime and ColorSync. Along the way it not only served the graphics industry, but also took a hand in shaping it.

PostScript and Desktop Publishing

QuickDraw was not the only technology born in 1984 to have a profound impact both the graphics industry and the Mac OS X platform. In the same year, Chuck Geschke and John Warnock incorporated a new company, Adobe Systems Inc. Adobe released the first version of their PostScript graphics system that same year.

The PostScript graphics system grew out of research Adobe’s founders performed while working at Xerox. That research centered around innovative ways to write control software for laser printers. The PostScript system combines a rich graphics model, a simple programming language, and a run-time environment. At the time of its introduction, the system’s ability to repurpose graphics on a broad number of printers with very different capabilities was a clarion call for the graphics industry.

PostScript was unusual because of the device independence inherit in the system. A PostScript program could send the same drawing commands to two printers with very different capabilities, and both would reproduce the same graphic to the best of their abilities. One printer might draw the graphic with a low resolution and in black and white, while the same program on another printer might generate a high-resolution color image. This was in stark contrast to the fixed resolution, device dependent nature of QuickDraw and other graphics libraries.

The paths of QuickDraw and PostScript were destined to converge. Apple and Adobe brought these two technologies together when they developed the LaserWriter printer. In spite of the fact that QuickDraw had one drawing model, and PostScript a completely different one, application developers combined the on-screen drawing with QuickDraw and the printing might of PostScript. This synthesis led to the creation of creative applications such as Aldus PageMaker and Adobe Illustrator. Applications like these freed document editors from the proprietary typesetting systems that had dominated the industry. The Desktop Publishing revolution had arrived.

PostScript on the Screen

The rift between the graphics model of the screen and the graphics model of the printer continued for some time. In fact, this was not limited to the Macintosh platform. Microsoft Windows, for example, used the GDI graphics library when drawing on screen. On many UNIX systems, applications used the XLib library of the X11 windowing system to create graphics on the screen. Both GDI and XLib are graphics libraries very similar to QuickDraw. Each of these environments also supported PostScript as a tool for creating high-quality graphics on the printer.

In this environment, application developers applied their creativity and ingenuity to bridge the gap between libraries and create WYSIWYG applications. It wasn’t long before enterprising developers realized the potential benefit of using PostScript for graphics on the screen as well. In fact, one of the earliest implementations of this idea came when Sun Microsystems created an entire windowing system based on PostScript! That windowing system was called NeWS, the Network extensible Windowing System.

NeWS was unusual because it used PostScript as more than just a graphics library. The windowing system itself was implemented on top of a customized PostScript interpreter. Developers could extend the system or write NeWS applications in PostScript. In spite of the novelty and innovation in NeWS, however, it never gained much of a foothold in the industry. Eventually it faded from view.

The engineers at Sun were not the only group to bring PostScript to the screen. One of the most successful environments to integrate PostScript into its graphics architecture was the NeXT Computer operating system. Steve Jobs started NeXT Inc. shortly after leaving Apple. The computers that company created were revolutionary in a number of ways. The NeXT operating system included an optimized PostScript interpreter. Applications created their graphics in windows by calling routines invoked the PostScript interpreter.

The success of the NeXT graphics library caused other industry leaders to take notice. Adobe collaborated with NeXT to create a standard called Display PostScript for PostScript graphics on the screen. Display PostScript incorporated a small set of extensions to the basic PostScript language. In time, Adobe licensed Display PostScript for use in other computing environments. The X11 applications on some UNIX computers could create windows that contained Display PostScript graphics. Display PostScript, like the NeWS window system, never gained a broad acceptance in the industry. When Apple purchased NeXT Computer, in 1996, it acquired all of its technologies, including its implementation of Display PostScript.

PDF to Quartz 2D

Even though Display PostScript enjoyed limited popularity, the appeal of PostScript continues to this day. There is, however, one evolution that is particularly relevant to the Macintosh and Quartz 2D.

The PostScript system includes both an imaging model and a programming language. While the flexibility of the imaging model continues to this day, the programming language aspects of PostScript have proven to be problematic.

PostScript interpreters run PostScript programs. Like most programs, PostScript code must execute sequentially. This can lead to difficulty when printing documents. For example, if a press operator wants to print page 99 of a 100-page document, the PostScript interpreter must execute the code that draws the first 98 pages. The results of that drawing take time, and the resulting graphics are merely discarded. This is obviously a waste of time and resources.

Furthermore, because PostScript drawings are actually programs, they are susceptible to programming bugs. To continue the example just discussed, a logic error on page 97 might cause the printer to abandon the entire print job. As these problems came to light, Adobe added some features to PostScript. The new features helped to alleviate problems but did not eliminate them. In the end Adobe recognized the limitations of PostScript and took another tack on the problem.

The Portable Document Format (PDF) works around many of the limitations of PostScript. At its heart, PDF is a file format that includes the graphics features of PostScript (with a few minor changes). At the same time, the standard removes most of the programming language aspects of PostScript. A PDF document is not an executable program so much as it is a structured container for drawing commands and related metadata. The file format continues PostScript’s advantages of device and resolution independence. In short, PDF retains the graphical power of PostScript but eliminates some of its less reliable aspects.

Apple evaluated the technologies they purchased for NeXT with a eye toward creating Mac OS X. They looked at the evolution of PostScript and the PDF strategy. Combining these elements with their own unique flair, Apple developed a new graphics library for Mac OS X that combined the richness of the Adobe Imaging Model with alpha channel support in the high-performance graphics library we know today as Quartz 2D.

Understanding this legacy can be an important part of understanding why the Quartz 2D imaging model behaves as it does. For example, Quartz 2D does not provide an easy mechanism for erasing graphics you have already drawn. The reason is that when you are drawing to a printer, the graphics may not be going to a frame buffer, and there is no way to erase graphics. Instead of erasing graphics, in Quartz 2D you create a mask, or clipping area, and draw the graphics you want the user to see relying on the mask to remove parts of the image you don’t want to display. This is a simple example but very illustrative of how the drawing model of the library can affect how it is used.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020