Quartz 2D

Quartz 2D is the primary graphics library in Mac OS X, it supersedes QuickDraw from earlier versions of Mac OS, now known as "Classic", and Display PostScript from NeXTSTEP.

Description
Quartz 2D is based on version 1.4 of the Adobe's Portable Document Format (PDF), a specification for an open file format that preserves all of the fonts, formatting, colors and graphics of any source document, regardless of the platform used to create it. Graphics functions which don't require advanced features (such as graphics embedding) will fall back to PDF 1.3 for improved performance. It replaced the Display PostScript imaging model from NeXTSTEP (the Unix-based predecessor to Mac OS X) to avoid paying licensing fees to Adobe.

Quartz 2D differs from QuickDraw in a number of key areas. QuickDraw is inherently based on raster graphics with primitive object support, where the fundamental graphical entity are points between pixels. Everything is defined in terms of points laid out on a 2-dimensional integer grid. Quartz 2D instead takes a more mathematical approach, where the coordinate space is an abstract concept defined by real values in 2 dimensions. Points in this space can be connected to form paths, such as straight lines, s, and so on. To create actual graphics on the display, the paths are rasterised as needed to generate the pixels at the display device's resolution. This permits the same graphics commands to yield the same output on any device using the best resolution available. As in PostScript, paths can be "stroked" to give outlines, lines and so forth, and closed paths can be filled to create solid shapes. Text is generated simply by paths formed into the shapes of the text glyphs.