My wife has been working on a pixel accurate recreation of MacPaint on the web, and one of the things that I've learned from on-and-off helping with it was just how much of the magic in it is actually just handled by QuickDraw.
Also, the text styling has a lot more complexity than you would expect.
QuickDraw's regions always impressed me. They could cover an arbitrary area, and most operations could be masked to a region. This was important for updating a window behind another efficiently, just mask to the visible portion and draw its contents normally.
As I recall, regions were essentially something akin to an array of run-length-encodings for each scan line (where, additionally, there was a sentinel or some way to indicate the next n rows are the same as the previous). The fun part is then writing a set of routines to union, difference, etc. pairs of these RLE region objects (and here I use the word 'object' loosely).
By "pixel accurate", do you mean the user interface or the rendering? Is she able to leverage the HTML 2D Canvas API or does she have to go lower level than that?
I’m using a buffer pool and raw bitmaps with calls to drawImage - the canvas api doesn’t play very well with trying to do things in a pixel perfect way.
I’ve gone on a lot of rabbit holes digging into original source code and dev manuals for this project, hopefully one day I’ll write some of it up somewhere. I think what’s been interesting is iterating towards the most elegant solutions has often meant ending up with pretty similar approaches to what Atkinson originally used.
gblargg|11 months ago
JKCalhoun|11 months ago
As I recall, regions were essentially something akin to an array of run-length-encodings for each scan line (where, additionally, there was a sentinel or some way to indicate the next n rows are the same as the previous). The fun part is then writing a set of routines to union, difference, etc. pairs of these RLE region objects (and here I use the word 'object' loosely).
jwstarr|11 months ago
allthreespies|11 months ago
I’ve gone on a lot of rabbit holes digging into original source code and dev manuals for this project, hopefully one day I’ll write some of it up somewhere. I think what’s been interesting is iterating towards the most elegant solutions has often meant ending up with pretty similar approaches to what Atkinson originally used.
userbinator|11 months ago