MacPaint and QuickDraw Source Code
For those who want to see how it worked “under the hood,” we are pleased, with the permission of Apple Inc., to make available the original program source code of MacPaint and the underlying QuickDraw graphics library.
Xcode won’t open the .a files for display. I recommend viewing using BBEdit, which has syntax highlighting for both Pascal and 68K assembler files.
Update (2023-08-23): See also: Hacker News.