QuickDraw Viewer I wanted to teach myself Swift programming, and needed something a bit more involved than just Hello World, so I decided the write a program that would decode QuickDraw image files and display them. This was basically a rewrite of the Java Quickdraw code I wrote, many years back. This program is functional, although there are many rendering edge cases and the UI is a bit rough and the code could certainly be improved. I originally decided to release it for the 40th anniversary of the original Macintosh computer. Philosophy This program is not meant to be a pixel correct QuickDraw renderer, instead it behaves more like a printer driver did under the classic Mac OS, and tries to render pictures as well as possible on a modern Mac OS X screen. The screen of my 2021 14" laptop has a resolution of around 264 DPI, closer to the resolution of the LaserWriter printers (300DPI) than that of the screen of a compact Macintosh (72 DPI) and well above the resolution of an ImageWriter dot matrix printer (144 DPI.) The rendering engine of Mac OS X is also closer to a PostScript printer than the QuickDraw model. So this program mostly translates QuickDraw instructions and delegates the actual rendering to Core Graphics. Instructions meant for printers (QuickDraw comments) are also used in this translation. QuickDraw QuickDraw was the graphical language of the original Macintosh, and the format used to store and exchange images on the computer. The original interpreter was written in large part in Motorola 68K by the late Bill Atkinson. Support for these files has been slowly decaying with newer versions of Mac OS X, and on my M1 PowerBook, Preview can only open a small subset of the files I have. Original Pict Example The decoder is mostly based on Inside Macintosh - Imaging With QuickDraw published in 1994. The book contains the resource definition of very simple QuickDraw picture. data 'PICT' (128) { $"0078" /* picture size; don't use this value for picture size ...
First seen: 2025-10-20 01:03
Last seen: 2025-10-20 10:04