Mac OS X Update: Quartz & Aqua

Ars takes a look at the underlying technology in the upcoming Mac OS X from …

Third Generation: Vectors

Many second generation display layers allow screen drawing based on coordinate systems other than the pixel grid. For example, a programmer could select a metric drawing mode and then specify a circle like the one in the example above, but with a radius of 2 centimeters (instead of 80 pixels) centered 5cm down and 5cm to the right on the screen. When the shape is drawn to the screen by the second generation display layer, those coordinates are translated to pixel values based on the screen resolution. These alternate drawing modes provide a form of device independence for second generation display layers (2cm may be a different number of pixels at a given screen resolution), but only as a sort of one-way portal for drawing. After drawing that circle, the display layer has no awareness of it as a geometric shape. It's simply some more pixels on the grid.

A third generation display layer goes a step further, providing not only device independent drawing modes, but also maintaining an awareness of shapes after they have been rendered to the screen. It does this by defining shapes in terms of their component vectors rather than their screen elements. This opens the door for mathematical transformations of on-screen shapes.

Going back to our 2cm circle, a third generation display layer knows where that circle is on the screen and how it is defined, so it is trivial for it to perform a transformation of that circle (say, scale 500%) and redraw it. Furthermore, the redrawn shape will not lose any detail since the effective resolution of the equations that define the shape is infinite. (Think of zooming in on a fractal—it's a never ending sea of detail.)

A second generation display layer does not maintain vector information about the shapes it draws. If an application running in an OS with a second generation display layer wants to perform similar graphical transformations, it must implement a third generation display layer within itself. Examples of this include vector drawing applications like Adobe Illustrator and Macromedia Freehand. Each application must roll its own vector graphics solution because the second generations display layers in Mac OS and Windows do not support these features.

Text handling is much like it is in a second generation display layer (which already handles vector fonts), but with additional transformation abilities such writing text on arbitrary curves.

An example of an early third generation display layer is the Display Postscript system used by NeXTSTEP. Since the display layer has to keep track of all these vector shapes itself, it makes sense to use an existing vector graphics definition language like Postscript instead of creating a new one from scratch. Using Postscript saves work and allows easy interchange and printing of graphics from such a system.

As mentioned earlier, Quartz is a third generation display layer. But it's got a few extra abilities that earlier implementations like Display Postscript lacked. Let's take a look...

John Siracusa / John Siracusa has a B.S. in Computer Engineering from Boston University. He has been a Mac user since 1984, a Unix geek since 1993, and is a professional web developer and freelance technology writer.