Related topics
  • ,
  • ,
  • ,

1984's MacPaint source code hits web

Plus ça change, plus c'est la même chose

Apple has donated the source code of the groundbreaking graphics app, MacPaint, to Silicon Valley's Computer History Museum, located in Mountain View, California.

Accompanying MacPaint is the source code for its underlying graphics-display library, QuickDraw. You can download both from the Computer History Museum here — and the museum also provides a nostalgic history of this seminal software.

In these days of Adobe Photoshop CS5, GIMP, and the like, it may be a stretch to remember exactly how much MacPaint contributed to genesis of graphics software. The lasso selection tool, paint-bucket fill tool, block eraser, pencil — all appeared originally in MacPaint. All worked inside a 416x240-pixel fixed window inside the Mac's 512x342-pixel display.

MacPaint 1.0

Movable tool palettes didn't appear until 1988's MacPaint 2.0

Even the now-ubiquitous moving dotted line that indicates a selection — called "marching ants" by MacPaint developer Bill Atkinson after a suggestion by Rod Perkins of Apple's Lisa team — originated in MacPaint. The story of the ants' development has Atkinson in a local burger-and-beer joint, where he was inspired by an animated Hamm's beer sign with a moving patterned layer below a contrasting mask.

MacPaint code

And lo, the marching ants were born

Atkinson was originally a member of the Lisa team, where he developed LisaGraf, the progenitor of QuickDraw. For the failed Lisa he also developed LisaSketch (aka SketchPad), which was renamed MacSketch when Atkinson moved to the Macintosh team, and was finally dubbed MacPaint in spring of 1983.

When the first Macintosh was released in January of 1984, MacPaint came with it. Among its contributions to the original Mac experience were its cut-and-paste skills — an image or portion of an image could be selected with either the marquee or lasso tool, copied or cut, then pasted into, for example, a MacWrite document.

That may not sound like much today, but in 1984 it was a revelation — as were the flicker-free select-and-drag bitmap images that MacPaint could display, the image and pattern cloning, and the overall ease of use. And, it must be remembered, the fun. Your Reg reporter, for example, stayed up all night playing with MacPaint when he first brought home a Mac in January 1984.

It's also remarkable how much Atkinson was able to cram into such a tiny application. Download the source code (it's MacPaint 1.3), open the MacPaint.p file and you'll discover a mere 5,804 lines of Pascal code. According to Mac-pioneer Andy Hertzfeld's excellent reminiscence, that code was supplemented by 2,738 lines of assembler, and compiled down to "less than .05 megabytes of executable code."

Remember, the original Macintosh came with a minuscule 128KB of RAM. In those far-away days, "write tight" wasn't a mere catchphrase — it was a necessity. And Atkinson's MacPaint was a sterling example. ®

Sponsored: Network DDoS protection