offscreenG.setColor(context.getPaintBackground());
offscreenG.fillRect(0, 0, width, height + 1);
// Reset for text rendering
offscreenG.setColor(g.getColor());
offscreenG.translate(-x, -y);
// Render the wrapped painter into the offscreen buffer. We offset
// the y coordinate by one so that no content will be rendered into
// the top pixel.
super.paint(context, offscreenG, x, y + 1, width, height);