Quartz 2D
Encyclopedia
Quartz 2D is the primary two-dimensional graphics rendering API for Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...

, part of the Core Graphics framework.

Overview

Quartz 2D is available to all Mac OS X application environments, and provides resolution-independent and device-independent rendering of bitmap graphics, text, and vectors both on-screen and in preparation for printing. Its responsibilities within the graphics layer include:
  • Rendering text using Apple Type Services (ATS)
    Apple Type Services for Unicode Imaging
    The Apple Type Services for Unicode Imaging is the set of services for rendering Unicode-encoded text starting with Mac OS 8.5 and in Mac OS X.It replaced the WorldScript engine for legacy encodings....

  • Displaying, manipulating, and rendering PDF documents
  • Converting PostScript
    PostScript
    PostScript is a dynamically typed concatenative programming language created by John Warnock and Charles Geschke in 1982. It is best known for its use as a page description language in the electronic and desktop publishing areas. Adobe PostScript 3 is also the worldwide printing and imaging...

     data to PDF data, and vice-versa
  • Displaying, manipulating, and rendering bitmap images via ImageIO
  • Providing color management via ColorSync
    ColorSync
    ColorSync is Apple Inc's color management API for the Mac OS and Mac OS X.-Version history:Apple developed the original 1.0 version of ColorSync as a Mac-only architecture, which made it into an operating system release in 1993. In the same year, Apple co-founded the International Color Consortium...

  • Displaying the elements of the Aqua
    Aqua (user interface)
    Aqua is the GUI and primary visual theme of Apple Inc.'s Mac OS X operating system. It is based around the theme of water, as its name suggests, with droplet-like elements and liberal use of translucency and reflection effects...

     user interface

Drawing in Quartz 2D

Quartz 2D expands the drawing functions associated with QuickDraw
QuickDraw
QuickDraw is the 2D graphics library and associated Application Programming Interface which is a core part of the classic Apple Macintosh operating system. It was initially written by Bill Atkinson and Andy Hertzfeld. QuickDraw still exists as part of the libraries of Mac OS X, but has been...

. The most notable difference is that Quartz 2D eliminates output device and resolution specificity.

The drawing model utilized by Quartz 2D is based on PDF specification 1.4. Drawing takes place using a Cartesian coordinate system
Cartesian coordinate system
A Cartesian coordinate system specifies each point uniquely in a plane by a pair of numerical coordinates, which are the signed distances from the point to two fixed perpendicular directed lines, measured in the same unit of length...

, where text, vectors, or bitmap images are placed on a grid. However, drawing output is not sent directly to the output device. Quartz 2D uses graphics contexts, environments in which drawing takes place. Each graphics context defines how the drawing should be presented: in a window, sent to a printer, an OpenGL layer, or off-screen. Each context rasterizes the drawing at the desired resolution without altering the data that defines the drawing. Thus, contexts are the mechanism by which Quartz 2D employs resolution- and device-independence. For example, a window context may rasterize an object to the appropriate screen resolution to create actual graphics on the display. The same object can be sent to a printing context at a much higher resolution. This permits the same graphics commands to yield output on any device using the most appropriate resolution.

History

Quartz 2D is similar to NeXT
NeXT
Next, Inc. was an American computer company headquartered in Redwood City, California, that developed and manufactured a series of computer workstations intended for the higher education and business markets...

's Display PostScript
Display PostScript
Display PostScript is an on-screen display system. As the name implies, DPS uses the PostScript imaging model and language to generate on-screen graphics...

 in its use of contexts. It first appeared as the 2D graphics rendering library called Core Graphics Rendering; along with Core Graphics Services (Compositing), it was wrapped into the initial incarnation of Quartz. Quartz (and its renderer) were first demonstrated at WWDC in May 1999.

Presently, the name Quartz 2D more precisely defines the 2D rendering capabilities of Core Graphics (Quartz). With the release of Mac OS X 10.2, marketing attention focused on Quartz Extreme, the composition layer, leaving the term "Quartz" to refer to the Core Graphics framework or just its 2D renderer. Presently, Quartz technologies can describe all of the rendering and compositing technologies introduced by Mac OS X (including Core Image
Core Image
Core Image is a pixel-accurate, near-realtime, non-destructive image processing technology in Mac OS X. Implemented as part of the QuartzCore framework of Mac OS X 10.4 and later, Core Image provides a plugin-based architecture for applying filters and effects within the Quartz graphics rendering...

 for example).

Prior to Mac OS X 10.4, QuickDraw rendering outperformed that of Quartz 2D. Mac OS X 10.4 rectified this, substantially increasing the standard rendering performance of Quartz 2D. Mac OS X 10.4 also introduced Quartz 2D Extreme: optional graphics processor (GPU) acceleration for Quartz 2D, although it is not an officially supported feature. Quartz 2D Extreme is disabled by default in Mac OS X 10.4 because it may lead to video redraw issues or kernel panics. In Mac OS X 10.5, Quartz 2D Extreme was renamed QuartzGL.

See also

  • Quartz (graphics layer)
    Quartz (graphics layer)
    Quartz specifically refers to a pair of Mac OS X technologies, each part of the Core Graphics framework: Quartz 2D and Quartz Compositor. It includes both a 2D renderer in Core Graphics and the composition engine that sends instructions to the graphics card...

  • Quartz Compositor
    Quartz Compositor
    Quartz Compositor is the windowing system in Mac OS X. It is responsible for presenting and maintaining rasterized, rendered graphics from the rest of the Core Graphics framework and other renderers in the Quartz technologies family...

  • QuickDraw
    QuickDraw
    QuickDraw is the 2D graphics library and associated Application Programming Interface which is a core part of the classic Apple Macintosh operating system. It was initially written by Bill Atkinson and Andy Hertzfeld. QuickDraw still exists as part of the libraries of Mac OS X, but has been...

  • Display PostScript
    Display PostScript
    Display PostScript is an on-screen display system. As the name implies, DPS uses the PostScript imaging model and language to generate on-screen graphics...

  • Core Image
    Core Image
    Core Image is a pixel-accurate, near-realtime, non-destructive image processing technology in Mac OS X. Implemented as part of the QuartzCore framework of Mac OS X 10.4 and later, Core Image provides a plugin-based architecture for applying filters and effects within the Quartz graphics rendering...


Competitors

  • Cairo
    Cairo (graphics)
    cairo is a software library used to provide a vector graphics-based, device-independent API for software developers. It is designed to provide primitives for 2-dimensional drawing across a number of different backends...

  • GDI
    Graphics Device Interface
    The Graphics Device Interface is a Microsoft Windows application programming interface and core operating system component responsible for representing graphical objects and transmitting them to output devices such as monitors and printers....

     and WPF
    Windows Presentation Foundation
    Developed by Microsoft, the Windows Presentation Foundation is a computer-software graphical subsystem for rendering user interfaces in Windows-based applications. WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0. Rather than relying on the older GDI...

     on Windows Vista
    Windows Vista
    Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK