Dojo (HowTo)







  Easter Eggs




  Martial Arts

New Graphics

By:David K. Every
©Copyright 1999

Apple created a new Graphics system, for OS X, which is called Quartz. This will allow for much richer graphics than in the past with QuickDraw.

QuickDraw of course will still exist for Mac Applications and legacy Apps (via Carbon) -- but Quartz will be a rich replacement for the future.

History of Graphics

John Warnock, Martin Newell, and Chuck Geschke started working at PARC on a page description language called JAM. This language would allow device and resolution independent description of graphic images on a page. Later Warnock and Geschke broke away and created Adobe, and the language evolved into PostScript.

Jef Raskin had done a thesis even earlier (late 60's) on the Quick Draw Graphics Engine -- a very similar concept as JAM but done on graphic images on the display (CRT). Jef went to Apple, where Bill Atkinson actually implemented QuickDraw as the basis of the Mac's graphics (after first creating LisaGraf, the graphics engine for the Lisa, and then adding a lot of his own ideas). QuickDraw was great, powerful, fast, and so on -- but it was implemented for a 72 - 75 DPI black and white screen. There were some capabilities for higher resolutions (and 8 colors), and much larger display area. QuickDraw was great for 1982-1983 (when it was implemented), but as soon as Apple started looking at Laser Printers and 300 DPI+, many of the implementation flaws of QuickDraw started to show through. Apple started investigating creating their own device independent printer description language (called QuickScript), but Apple was able to make a deal with Adobe and even invested in them to help them get started. This was a good union, since QuickDraw worked better onscreen, and PostScript was specialized for higher resolution printers -- and the translation was manageable.

Soon after this, Apple started creating Color QuickDraw. PostScript and the original QuickDraw were pretty much black and white (though there were a few extension for Color). Apple extended QuickDraw to handle color, and then 32 bit color (millions of colors and photo realism). It took PostScript a bit longer to get this worked out.

In the late 80's Jobs broke away from Apple and created NeXT. NeXT needed a good imaging system and wanted to use the same display engine for both the screen and printer. NeXT didn't have the money or time to roll their own, and they were doing what was going to become a higher end workstation (which meant licensing fees weren't as big of a deal as for Apple), so they worked with Adobe and created Display Post Script. DPS (Display PostScript) was PostScript that could also work on the screen as well as for printers, and it supported shades of gray (and later color), and so on. Adobe was going to license DPS to many companies, but the licensing fees and performance turned out to be prohibitive. DPS was slow compared to QuickDraw and other roll-your-own solutions, because it had to be generalized to work with many resolutions (instead of just one).

(Remember, slow in 1988 is not slow on a 1992 or 1995 computer -- let alone a 1999 computer. Time and performance increases cure all evils when it comes to "slow").

It was a little after this when the licensing fees for PostScript (fonts especially) where killing Apple and limiting their use (Apple was trying to add PostScript Fonts to the Mac, and PostScript licensing was roughly doubling the cost of a Laser Printer). So Apple created TrueType Fonts which were more powerful and license free, and Apple started up the QuickScript project again -- which later became QuickDraw GX. QuickDraw GX was a totally new graphics engine, that had built in support for resolution independence, all sorts of new transforms, transparencies, features and so on. It was also Object Oriented in a few ways, which was better (but this is way too detailed a discussion to get into here).

Adobe saw the light (now that Apple put a gun to their head), and Adobe finally published how to actually use their proprietary font formats and they made postscript more affordable, and so on. GX kinda flopped, not because it was bad (though the first implementations weren't great), but because it was new and there was a lot of legacy built on the old way. Companies like Adobe (Aldus, Altsys, Quark and others) could ignore the new way (GX) and drive GX into oblivia. This made sense for the companies that owned the graphics and publishing arenas -- they had invested many years of effort into making Illustration and Layout programs and they didn't want others to get for free (through GX) what had taken them years to add to QuickDraw themselves. Of course GX's failure wasn't all everyone else's fault -- Apple couldn't market it, and they tried to bundle too much in with it, and tried to charge for it, and so on. GX made a sound like hamburger hitting the sidewalk, after being dropped from a large building.

Ironically, Taligent borrowed from the GX engine (at least conceptually) when they broke off from Apple. When IBM and Sun made nice on Java, the Java2D graphics engine by Sun seemed to have borrowed a lot (a whole lot) from the Taligent 2D Graphics Engine. So Java graphics may owe a bit (quite a bit) to Apple. It is funny how these ideas keep going around and companies keep borrowing from each other.

Apple and NeXT became one, and for the future they had to choose where to go in the future (for OS X). Do they choose QuickDraw (or QuickDraw GX), do they choose Display PostScript or do they make something new? Adobe's licensing fees once again made the decision -- it wouldn't be straight DPS, since Apple couldn't afford to make a mainstream OS on something that they would have to pay Adobe a per unit fee on. GX had a bad name, and would have had to have been reworked a bit. A completely new approach (originally called eQD, or extended QuickDraw) was going to be way too much work (and was going to be hard to make compatible with both). The NeXTies at Apple liked the DPS way of doing things (keeping printing and onscreen imaging as close as possible and tied to what the pro's used with PostScript).

Adobe was pushing Apple to use PDF (and license from Adobe). PDF is sort of an objectified (grouped) Postscript document that allows for graphics files to be sent to the screen or the printer. It is a hybrid of PS and DPS, with extra information embedded in (like font information can travel with the document) -- and they had already borrowed a few concepts from QuickDraw GX. So it was a good compromise (though still more PostScript-stream like than GX's object like). PDF technology is pretty good, but PDF didn't cure Apple's fundamental problem (the licensing fee) -- not to mention that a company like Apple doesn't want to be married to (and dependent on) another company for something as critical as their graphics system (Apple needed to own the code).

It is very hard to track some sorts of innovation since there is so much crossover. Apple borrowing from others and being borrowed from -- people moving back and forth between companies, and so on. Certainly QuickDrawGX drove Adobe to do more than they would have done otherwise, and gave them ideas on how to do so. Of course GX borrowed from what came before it (including Adobes technologies), and so on. The only one that seems to have NOT contributed anything to the graphics market (or much of anything) seems to be Microsoft.

Which is Better (QD, GX, PS / DPS or PDF)

Each imaging system has advantages and disadvantages. And remember there is conceptually better, which is the better implementation and which is pragmatically better (which is more standard).

  • QuickDraw was fast, tight, small in memory, powerful. But it was based on integer math, and just can't handle (well) large areas like those required for high resolution laser printers. It handles color well (at least Color QuickDraw does) -- and it does on screen images superb. It was also sort of designed for resolution independence (in some places), but it wasn't used that way enough, and that bad legacy prevented it from growing well in those areas. It also used older procedural and stream based API, and it was long overdue for an overhaul.
  • QuickDrawGX was that overhaul (to regular QD). GX used fixed-point coordinates which allowed for more display area (lots more), and more detail. Instead of using a stream of data (each drawn object being dependent on the drawing environments state), it was more object based -- each object contained all of its own attributes and was separate from other objects and the current drawing state. This is a better idea than an embedded stream -- conceptually. Sadly, the implementation wasn't great, the marketing of it was worse. The API's were still procedure based instead of object based (go try to figure that one out), and it wasn't doing very well market wise -- so it was pirated for parts and ideas by everyone else.
  • PS and DPS are different aspects of the same thing -- DPS just has more hinting and control for onscreen information. Both are streams based language to image a page. To draw an object (or page) you need to draw all the objects (pages) before (to get the state information), and all objects after it (to make sure your object wasn't just wiped out with a big white rectangle over it). Sadly, the language (syntax) used to print postscript stinks -- it is cryptic and a pain in the butt to use, QuickDraw is far easier to call procedurally. But the resolution independence of PS is much better, and graphics drawn in this environment can look fantastic, and they look the same on screen (DPS) as on the printer (PS). (QuickDraw and GX look correct when printed on some printers, but on others there can be translation errors). And everyone (high end) already uses PS for printers -- legacy matters.
  • PDF is sort of a newer PS/DPS hybrid that allows some grouping of objects, but is still more of a PostScript with extras than something completely new. Some improvements are things like pages can be rendered independent of other pages, there is some limited security and compression capabilities and better annotations (ways to extend the description). But I have not actually worked with PDF much, so my knowledge here is the weakest. PDF is strange in that it is also a file format as well as an on screen and print format. PDF also has the ability to embed font information in the file (like QuickDrawGX does) so that a page can look proper even if you don't have the font installed on your system. PDF can also handle ways to extract information from those documents. So I think of PDF as a super-PS with font and document management features.

If all this is a bit confusing, that is OK. There are lots of little strengths and weaknesses of each. QuickDraw looks great on screen, but has more problems at high resolutions. PDF looks great on printers, but the onscreen display has not been great on the viewers that I've seen so far. DPS was better onscreen (than PS or PDF), but Adobe made NeXT cripple the implementation for some printers (so that DPS doesn't eliminate the need for PS by doing it all for it). It is all muddled and I don't really think any are the perfect technologies or implementation (too much legacy). It seems that over time, things keep improving (more or less), and so the later the technology/implementation, the better it will be (overall). Now we have Quartz -- which is later still, and makes another leapfrog.

What is Quartz?

Apple had a few requirements for Quartz, and these requirements define what Quartz' is.

  1. Eliminate DPS
  2. Create a New Windowing System and Graphics Library
  3. Propagate and Integrate (printing, ColorSync, QuickTime, Java, UI)
  4. Encourage developer adoption by adding new features, SDKs and so on (make it compelling).
  5. 2D Graphics system that was Floating Point Based (unlike QuickDraw which is Integer, and GX which is fixed point) to allow for huge images (on printers)
  6. Apple had to create a newer Window server to support Quartz that was lightweight (no drawing) with buffering support (off screen drawing in shared memory).
  7. Use standards when possible, and create a document format for those graphics.

This wasn't exactly what Adobe had in mind by trying to force Apple to PDF, they wanted Apple to use their PDF (not create their own Uber-PDF). However, this is a really good compromise by Apple, it tries to borrow from the best of all worlds and since the implementation will be Apple's, they don't owe royalties to Adobe.

It is a completely new windowing system and CoreGraphics (2D Graphics library). All this is Apple Technology, but it is based on both Display Postscript (conceptually) and PDF (Adobe's Portable Document Format). Since Apple was borrowing from their NeXT (DPS) System, and they could borrow from PDF, and QDGX (conceptually), they could make a really neat system in less time, and it wasn't all new -- but they could improve by creating the latest implementation. And improve they did -- the Demos shown at WWDC defy description, but I'll try. All the text and graphics were anti-aliased (smoothed). It could handle rotations, deformations (stretching, skewing, and so on), transparencies, effects (glows, highlights and so on), and more. Everything looked amazingly sharp, and was surprisingly fast for what was going on. Apple was doing arbitrary rotation of objects and there was no flicker or distortion of edges. Everything had variable transparency, and Apple flaunted it -- moving objects over other objects (and allowing you to see through them). Some objects cast shadows (really another object with blur of softening effects), and those shadows would blend well with other objects. Text could be bound to a path, and they were dynamically changing the path and the text was updating in realtime. Everything was so smooth and clear it was confusingly sharp -- they looked like pictures.

What Apple didn't show may be as informative as what they did show. I didn't see a lot of bitmaps (photographs) being manipulated. Arbitrary rotation of vector graphics (drawings) is far easier to do (without artifacts) than arbitrary rotation of raster graphics (bitmaps). That could indicate what still needs to be done. They didn't have graphics acceleration completed -- but the speed was already acceptable. The only time I saw things bog down at all was when there were lots of of complex objects and transforms. The Graphics System will not only take advantage of Graphics Accelerators, but also AltiVec (when that becomes available). So things look like they are progressing very well and will be very quick indeed.


They will have to be more completed and documented before I can give real definitive conclusions. But there seems to be a lot of very good evolution going on. The Quartz Graphics looked sharper than things I've seen before. It looked like a high-powered Adobe Illustrator replacement, with better previewing and effects, and all built in to the OS itself. This will be a fantastic foundation for OS X. And programmers can call the same functionality from Carbon or Cocoa -- so it is versatile. This means that every Application that does drawing or illustration can have the power of this engine built in, instead of requiring programmers to do all that themselves. This should enable even more powerful programs in the future.

I think the most powerful capabilities will be in the printing aspects. Users will print to PDF files, whether that goes to a printer or not. This means there is a built in print preview (and editing). In fact, PDF goes everywhere in the System -- you can embed that in emails that you send to others, and use it to paste and edit pictures between programs. This makes the whole clipboard more powerful as well. Everything builds on PDF -- and that is good for OS X users. There will be a low-level API for programmatically calling graphics routines, which should be nicely abstracted and powerful (QuickDraw like replacement). However, most programmers won't need to go to that level and can use standardized image formats. There will also be more integration with QuickTime, which should mean native support of dozens (or more) graphics formats using QuickTime's built-in Importers and Exporters (GIF, TIF, JPEG, PNG, PICT, BMP, EPS, and many more). And QuickTime also adds the power and flexibility of animation (sprites) to Quartz. Apple is even looking at supporting up and coming standards like SVG (Scaleable Vector Graphics Initiative), and the ability to export the graphics as text (in an XML tagged name space).

There are some hurdles to getting companies to adopt Quartz. It is another change to the way things are done -- and programmers and management of software companies hate that. (Means cost and time). But it can be worth the costs, and give companies some competitive advantages -- so if there is enough commitment by Apple, and enough momentum, and enough new features (added value) others will follow. Quartz will probably have all that.

So this truly looks to be a next-generation imaging system that builds on the strengths of those that came before it -- and extends them. It sets a new baseline for graphics subsystems for all Applications that will build up on the foundation of Quartz. Of course what this means to users is more standards, more features, better graphics, all built in to OS X thanks to Quartz.

Created: 05/18/99
Updated: 11/09/02

Top of page

Top of Section