Switching to foreground rather than background color is going to simplify some calculations, particularly when text after the fold wraps. I have to detect that and render more than rectangle. If I want rounded corners I have to make sure wrapping points are not rounded by starting/ending rectangles a little off screen. This all feels like excessive complexity.
This would all be simpler if we had primitives for drawing text while specifying the background. Oh well.
6QTCZLJ7E6F3UGS6LFH2FMKPFNKJ7PDWHHI2EWTK7SB2K4IBY5SQC