nl.captcha.text.renderer
Class DefaultWordRenderer

java.lang.Object
  extended by nl.captcha.text.renderer.DefaultWordRenderer
All Implemented Interfaces:
WordRenderer

public class DefaultWordRenderer
extends java.lang.Object
implements WordRenderer

Renders the answer onto the image.

Author:
James Childers

Constructor Summary
DefaultWordRenderer()
          Use the default color (black) and fonts (Arial and Courier).
DefaultWordRenderer(java.util.List<java.awt.Color> colors, java.util.List<java.awt.Font> fonts)
          Build a WordRenderer using the given Colors and Fonts.
 
Method Summary
 void render(java.lang.String word, java.awt.image.BufferedImage image)
          Render a word onto a BufferedImage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWordRenderer

public DefaultWordRenderer()
Use the default color (black) and fonts (Arial and Courier).


DefaultWordRenderer

public DefaultWordRenderer(java.util.List<java.awt.Color> colors,
                           java.util.List<java.awt.Font> fonts)
Build a WordRenderer using the given Colors and Fonts.

Parameters:
colors -
fonts -
Method Detail

render

public void render(java.lang.String word,
                   java.awt.image.BufferedImage image)
Render a word onto a BufferedImage.

Specified by:
render in interface WordRenderer
Parameters:
word - The word to be rendered.
image - The BufferedImage onto which the word will be painted.


Copyright © 2010-2011 James Childers. All Rights Reserved.