News for hackers. Stuff that matters.
Re:Investigating MacPaint's Source Code by gblargg on Saturday April 05, 2025 @05:56AM (#43592237)
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).