Quartz 2D

Last updated

Quartz 2D is the native two-dimensional graphics rendering API for macOS and iOS platforms, part of the Core Graphics framework.

Contents

Overview

Quartz 2D is available to all macOS and iOS 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: [1]

Because Quartz 2D is one of several Quartz Technologies, the term "Quartz" by itself must be taken in context.

Drawing in Quartz 2D

Quartz 2D expands the drawing functions associated with QuickDraw. 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. [2] Drawing takes place using a Cartesian coordinate system, where text, vectors, or bitmap images are placed on a grid. [3] 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. [4]

History

Quartz 2D is similar to NeXT's Display PostScript 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. [5] Quartz (and its renderer) were first demonstrated at WWDC in May 1999. [6]

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 macOS (including Core Image for example).

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

See also

Related Research Articles

Vector graphics Computer graphics images defined by points, lines and curves

Vector graphics are computer graphics images that are defined in terms of points on a Cartesian plane, which are connected by lines and curves to form polygons and other shapes. Vector graphics have the unique advantage over raster graphics in that the points, lines, and curves may be scaled up or down to any resolution with no aliasing. The points determine the direction of the vector path; each path may have various properties including values for stroke color, shape, curve, thickness, and fill.

Display PostScript is a 2D graphics engine system for computers which uses the PostScript (PS) imaging model and language to generate on-screen graphics. To the basic PS system, DPS adds a number of features intended to ease working with bitmapped displays and improve performance of some common tasks.

The Graphics Device Interface (GDI) is a legacy component of Microsoft Windows responsible for representing graphical objects and transmitting them to output devices such as monitors and printers. Windows apps use Windows API to interact with GDI, for such tasks as drawing lines and curves, rendering fonts, and handling palettes. The Windows USER subsystem uses GDI to render such UI elements as window frames and menus. Other systems have components that are similar to GDI; for example: macOS has Quartz and X Window System has X.Org Server.

QuickDraw is the 2D graphics library and associated Application Programming Interface (API) which is a core part of the classic Mac OS operating system. It was initially written by Bill Atkinson and Andy Hertzfeld. QuickDraw still existed as part of the libraries of Mac OS X, but had been largely superseded by the more modern Quartz graphics system. In Mac OS X v10.4, QuickDraw has been officially deprecated. In Mac OS X v10.5 applications using QuickDraw cannot make use of the added 64-bit support. In Mac OS X v10.8, QuickDraw header support was removed from the operating system. Applications using QuickDraw will still run under OS X 10.8 through macOS 10.13; however, the current versions of Xcode and the macOS SDK do not contain the header files to compile such programs.

Preview (macOS) Image and PDF viewer software by Apple

Preview is the vendor-supplied image viewer and PDF viewer of the macOS operating system. In addition to viewing and printing digital images and Portable Document Format (PDF) files, it can also edit these media types. It employs the Aqua graphical user interface, the Quartz graphics layer, and the ImageIO and Core Image frameworks.

QuickDraw GX was a replacement for the QuickDraw (QD) 2D graphics engine and Printing Manager inside the classic Mac OS. Its underlying drawing platform was a resolution-independent object oriented retained mode system, making it much easier for programmers to perform common tasks. Additionally, GX added various curve-drawing commands that had been lacking from QD, as well as introducing TrueType as its basic font system.

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 layer. The framework was later added to iOS in iOS 5.

Quartz Compositor is the display server in macOS. 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.

In Apple's macOS operating system, Quartz is the Quartz 2D and Quartz Compositor part of the Core Graphics framework. Quartz includes both a 2D renderer in Core Graphics and the composition engine that sends instructions to the graphics card. Because of this vertical nature, Quartz is often synonymous with Core Graphics.

Cairo is an open source graphics library that provides a vector graphics-based, device-independent API for software developers. It provides primitives for two-dimensional drawing across a number of different back ends. Cairo uses hardware acceleration when available.

Font rasterization process of converting text from vector to raster

Font rasterization is the process of converting text from a vector description to a raster or bitmap description. This often involves some anti-aliasing on screen text to make it smoother and easier to read. It may also involve hinting—information embedded in the font data that optimizes rendering details for particular character sizes.

Real-time computer graphics Sub-field of computer graphics

Real-time computer graphics or real-time rendering is the sub-field of computer graphics focused on producing and analyzing images in real time. The term can refer to anything from rendering an application's graphical user interface (GUI) to real-time image analysis, but is most often used in reference to interactive 3D computer graphics, typically using a graphics processing unit (GPU). One example of this concept is a video game that rapidly renders changing 3D environments to produce an illusion of motion.

Xgl Display server implementation

Xgl is an obsolete display server implementation supporting the X Window System protocol designed to take advantage of modern graphics cards via their OpenGL drivers, layered on top of OpenGL. It supports hardware acceleration of all X, OpenGL and XVideo applications and graphical effects by a compositing window manager such as Compiz or Beryl. The project was started by David Reveman of Novell and first released on January 2, 2006. It was removed from the X.org server in favor of AIGLX on June 12, 2008.

Core Video is the video processing model employed by macOS. It links the process of decompressing frames from a video source to the rest of the Quartz technologies for image rendering and composition. Both QuickTime X and QuickTime 7 depend on Core Video.

Quartz Composer

Quartz Composer is a node-based visual programming language provided as part of the Xcode development environment in macOS for processing and rendering graphical data.

The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap. HTML5 Canvas also helps in making 2D games.

Core OpenGL, or CGL, is Apple Inc.'s Macintosh Quartz windowing system interface to the OS X implementation of the OpenGL specification. CGL is analogous to GLX, which is the X11 interface to OpenGL, as well as WGL, which is the Microsoft Windows interface to OpenGL.

Resolution independence is where elements on a computer screen are rendered at sizes independent from the pixel grid, resulting in a graphical user interface that is displayed at a consistent size, regardless of the resolution of the screen.

Apple's Macintosh computer supports a wide variety of fonts. This support was one of the features that initially distinguished it from other systems.

LiveQuartz Graphic editor developed for macOS

LiveQuartz is a basic graphic editor developed for macOS by Romain Piveteau.

References

  1. "Apple - Developer - Quartz 2D Programming Guide" . Retrieved 2012-03-28.
  2. "Apple - Developer - Graphics & Imaging Overview" . Retrieved 2007-01-25.
  3. "Apple - Developer - Quartz Programming Guide for QuickDraw Developers: Coordinate Space". Archived from the original on October 11, 2008. Retrieved 2007-01-25.
  4. "Apple - Developer - Quartz Programming Guide for QuickDraw Developers: Drawing Destinations". Archived from the original on September 5, 2008. Retrieved 2007-01-25.
  5. "Ars Technica - Mac OS X DP4" . Retrieved 2007-01-25.
  6. "Ars Technica - Mac OS X Update: Quartz & Aqua" . Retrieved 2007-01-25.
  7. 1 2 Mac OS X 10.4 Tiger | Ars Technica
  8. "Apple - Info - Docs - About the Mac OS X 10.4.3 Update (Delta)". Archived from the original on 2007-10-16. Retrieved 2007-08-19.