boolean underlined, float x, float y) {
float tx = (shadowX < 0) ? -shadowX : 0, ty = (shadowY < 0) ? -shadowY : 0;
float sx = (shadowX < 0) ? 0 : shadowX, sy = (shadowY < 0) ? 0 : shadowY;
canvas.save();
if (underlined) {
IRectangle bounds = text.bounds();
canvas.setFillColor(shadowColor).fillRect(
sx+bounds.x()+x, sy+bounds.y()+bounds.height()+1, bounds.width()+1, 1);
canvas.setFillColor(textColor).fillRect(
tx+bounds.x()+x, ty+bounds.y()+bounds.height()+1, bounds.width()+1, 1);
}
canvas.setFillColor(shadowColor);
canvas.fillText(text, x+sx, y+sy);
canvas.setFillColor(textColor);
canvas.fillText(text, x+tx, y+ty);