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?
Re:Investigating MacPaint's Source Code
by allthreespies on Saturday April 05, 2025 @04:03AM
(#43591794)
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.
Re:Investigating MacPaint's Source Code
by userbinator on Saturday April 05, 2025 @01:41AM
(#43591104)
MSPaint (which I wish MS would officially open-source) heavily relies on GDI too.
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.
Re:Investigating MacPaint's Source Code
by JKCalhoun on Saturday April 05, 2025 @09:14AM
(#43593202)
Me as well.
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).
Also, the text styling has a lot more complexity than you would expect.