Another hefty set of updates today.
Following on from the requests made in the forum, I’ve added a new “drawBitmap()” method to the GraphicsPort class that will treat a specified colour as transparent. Any pixels of that colour won’t get drawn. This is a lot slower than the usual method, as it involves drawing the bitmap pixel-by-pixel instead of using the DMA hardware, so it should only be used when necessary.
In the same thread, Jeff asked for some improvements to the font system. I have moved the “drawChar()” function out of the TextWriter class and into the font classes, which means each font is now responsible for blitting itself. It offers a much more flexible system. In addition to this, I’ve split the FontBase class in two and added a new “FixedWidthFontBase”. Woopsi is now set up to handle proportional fonts. I just need someone to write a proportional font class (hint hint).
As part of the proportional font changes I re-wrote the “Text::wrap()” function. It’s a lot neater, faster and more efficient now. However, the change seems to have broken the scrollbars again (gnnk) so I’ll need to spend some time debugging it.
EDIT: Scrollbars fixed (or as fixed as they ever have been), plus I’ve fixed some other scrollbar problems I found.