Commit Graph

1 Commits

Author SHA1 Message Date
Kartik K. Agaram 97e65935f3 reorg: be much more deliberate about mutable state
on.draw no longer mutates anything but the screen.

We now have levels of recomputation:
  * A: convert hierarchies of text (Page) into a flat array of shapes
    (Surface)
  * B: convert surface coordinates to viewport coordinates.
  * ..and lots of room to grow.
Importantly, these levels are decoupled from on.* events.

The level at which we start using viewport settings (B) is also
responsible for updating the default font, a global setting used all
over the place inside the editor widget.

Hopefully we won't see bad box heights any more. We still have text
rendering differently at different zoom levels, though.
2022-12-23 15:26:43 -08:00