/** * Create a new TextPainter which will paint the specified text with the specified font and paint. * @param text the text to paint * @param font the font to paint the text with * @param paint the paint to paint with */ public TextPainter(String text, Font font, Paint paint) { this.text = text; this.font = font; setFillPaint(paint); }
/** * Create a new TextPainter which will paint the specified text with the specified font and paint. * @param text the text to paint * @param font the font to paint the text with * @param paint the paint to paint with */ public TextPainter(String text, Font font, Paint paint) { this.text = text; this.font = font; setFillPaint(paint); }
/** * Create a new TextPainter which will paint the specified text with the specified font and paint. * @param text the text to paint * @param font the font to paint the text with * @param paint the paint to paint with */ public TextPainter(String text, Font font, Paint paint) { this.text = text; this.font = font; setFillPaint(paint); }
/** * Create a new TextPainter which will paint the specified text with the specified font and paint. * @param text the text to paint * @param font the font to paint the text with * @param paint the paint to paint with */ public TextPainter(String text, Font font, Paint paint) { this.text = text; this.font = font; setFillPaint(paint); }
/** * Create a new TextPainter which will paint the specified text with the specified font and paint. * @param text the text to paint * @param font the font to paint the text with * @param paint the paint to paint with */ public TextPainter(String text, Font font, Paint paint) { this.text = text; this.font = font; setFillPaint(paint); }
public BufferedImage watermarkImage(BufferedImage src, TextPainter textPainter) { BufferedImage dest; int width = src.getWidth(); int height = src.getHeight(); // the text is with white on black background on the bump map image BufferedImage bumpImage = new BufferedImage(width, height, TYPE_INT_RGB); Graphics2D g = bumpImage.createGraphics(); g.setColor(BLACK); g.fillRect(0, 0, width, height); textPainter.setFillPaint(WHITE); textPainter.paint(g, this, width, height); g.dispose(); dest = ImageUtils.bumpMap(src, bumpImage, "Watermarking"); return dest; }