extend

Prepares text to be rendered by painters. RoundedCornerSpanPainter and SquigglyUnderlineSpanPainter use this for removing background and underline spans so that they can be drawn manually.