it's... an array of pixels? does that imply all apps must draw themselves?
it's... an array of pixels? does that imply all apps must draw themselves?
Looking at the source code of the cursor app [0], we can see it draws the mouse cursor and skips the rest. The transparent console app [1] is doing something more complicated which I haven't tried to fully understand, but which definitely involves massaging pixels and even temporarily saves pixel data in ctx.store.b1 and ctx.store.b2 so it looks like some kind of double buffering.
[0]: https://github.com/Ruddle/Fomos/blob/cba0460af59e63f46c7646f8a2f29d574ff0d722/app_cursor/src/main.rs#L75
[1]: https://github.com/Ruddle/Fomos/blob/cba0460af59e63f46c7646f8a2f29d574ff0d722/app_console/src/main.rs#L384If apps draw themselves, and transparency is involved, this could need:
a) Save background which is overwritten ("damage areas" is a modern description, I think?).
b) Alpha blending - calculating a weighed average between background & what you're overwriting it with.
c) And maybe some kind of text-buffer -> bitmap conversion (if not done ahead of time).
Enough pixel massaging right there.