This article originally appeared in TidBITS on 2010-07-21 at 10:26 a.m.
The permanent URL for this article is: http://tidbits.com/article/11446
Include images: Off

Apple Donates MacPaint and QuickDraw Source Code to Museum

by Glenn Fleishman

Few pieces of software inspire rapture. QuickDraw and MacPaint are surely at the top of the short list. QuickDraw, developed by Bill Atkinson, defined what you saw when you used a Mac; MacPaint was the first mainstream program that let you create imagery on a personal computer.

Through the efforts of Andy Hertzfeld, an early and long-time Apple employee deeply involved in the Mac's creation and development, Apple has donated the source code for QuickDraw and MacPaint [1] to the Computer History Museum. Apple retains the copyright, but it's generous of the firm to give an insight into the fundament of Macintosh's heart.

QuickDraw and MacPaint were both developed by Atkinson for the Mac's predecessor, the Lisa. However, they reached fruition on the Mac.

QuickDraw is a set of graphic primitives and window-handling routines that provided Apple's developers and third-party software companies with highly optimized ways to present and update information on the screen. That is, no one had to develop the same approach twice; instead, developers could tap into a constantly improving set of routines designed to work as fast as possible. (Graphic primitives includes things like making squares, circles, and polygons, or shading an area enclosed by a line.)

This was in contrast to most graphical systems of the time and for years thereafter. I recall using Windows 1.0 a few years later, in which every piece of software seemed to invent its own way of interacting with a user, although Microsoft had consistency across its own software line.

Atkinson figured out ways to speed up clipping by a couple of orders of magnitude. Clipping happens when overlapping windows have to be drawn. Atkinson describes some of his techniques in this Computer History Museum oral interview [2] (with both him and Hertzfeld) in 2004.

By making clipping fast, you could drag arbitrary windows around and have many windows on screen without the operating system becoming unusably slow. Hertzfeld wrote the glue (literally called QuickGlue) that connected QuickDraw into the Mac OS for developer's use.

MacPaint's importance shouldn't be overlooked, either. It was the first capable digital drawing program available to a mass audience, and it could be used to produce real work. Relying on QuickDraw components and extending them, Atkinson developed a rich set of metaphors and approaches for drawing that still define the dominant paradigm in software today.

In the image below, LisaSketch's toolbar is at the far left, and MacPaint's is just to its right. The next two toolbars to the right are from the latest versions of GraphicConverter (6.7) and Adobe Photoshop (CS5).

[image link] [3]

MacPaint was also one of the few programs that came with the Mac. For a lot of people, it was the Mac: no one had ever seen anything like this. Click and drag with the mouse and make shapes! And few people had ever used a mouse before, either, so MacPaint introduced users to the power of hand gestures translated through hardware.

MacPaint was written in Mac Pascal and 68000 assembly language (about 60 percent Pascal); QuickDraw is 100-percent assembler. Assembly language is one step above machine language. Machine language is the program code represented directly in the numbers the CPU uses for commands; programmers sometimes reach down to this layer today for optimization. Assembler is a lightly abstracted layer above it that allows the use of symbols and operations that are converted into sequences of machine code.

Hertzfeld wrote up a series of stories about his experiences at Apple at Folklore.org [4]. I reviewed the book adaptation of this site in "Continuous Revolution [5]" (24 January 2005).

[1]: http://www.computerhistory.org/highlights/macpaint/
[2]: http://www.computerhistory.org/collections/accession/102658007
[3]: http://db.tidbits.com/resources/2010-07/four_toolbars.jpg
[4]: http://folklore.org/
[5]: http://db.tidbits.com/article/07960