FontMetrics metrics = g.getFontMetrics();
int infoWidth = metrics.stringWidth(text);
int infoDescent = metrics.getDescent();
if(AppConstants.WATERMARK_STYLE_CROSS.equalsIgnoreCase(vo.getParams().getWatermarkTextStyle())){
//cross text watermark style
g.rotate(Math.toRadians(-45),sw*1.0f/2,sh*1.0f/2);
g.drawString(vo.getParams().getWatermarkText(), (sw- infoWidth)/2, sh/2);
} else if(AppConstants.WATERMARK_STYLE_TINY.equalsIgnoreCase(vo.getParams().getWatermarkTextStyle())){
g.drawString(vo.getParams().getWatermarkText(), sw - infoWidth - 10, sh - infoDescent-10);
}
g.dispose();