com.octo.captcha.component.image.wordtoimage
Class SimpleWordToImage

java.lang.Object
  extended by com.octo.captcha.component.image.wordtoimage.AbstractWordToImage
      extended by com.octo.captcha.component.image.wordtoimage.SimpleWordToImage
All Implemented Interfaces:
WordToImage

public class SimpleWordToImage
extends AbstractWordToImage

Simple image to word implementation. For eductation only, do not use it in production


Constructor Summary
SimpleWordToImage()
           
 
Method Summary
 java.awt.image.BufferedImage getBackground()
          Generates a backround image on wich text will be paste.
 java.awt.Font getFont()
          Method from imageFromWord method to apply font to String.
 int getImageHeight()
           
 int getImageWidth()
           
 int getMaxAcceptedWordLenght()
          Deprecated. misspelled, use getMaxAcceptedWordLength() instead
 int getMaxAcceptedWordLength()
           
 int getMinAcceptedWordLenght()
          Deprecated. misspelled, use getMinAcceptedWordLength() instead
 int getMinAcceptedWordLength()
           
 int getMinFontSize()
           
 
Methods inherited from class com.octo.captcha.component.image.wordtoimage.AbstractWordToImage
getImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleWordToImage

public SimpleWordToImage()
Method Detail

getMaxAcceptedWordLength

public int getMaxAcceptedWordLength()
Returns:
the max word length accepted by this word2image service

getMinAcceptedWordLength

public int getMinAcceptedWordLength()
Returns:
the min word length accepted by this word2image service

getMaxAcceptedWordLenght

public int getMaxAcceptedWordLenght()
Deprecated. misspelled, use getMaxAcceptedWordLength() instead

Returns:
the max word lenght accepted by this word2image service

getMinAcceptedWordLenght

public int getMinAcceptedWordLenght()
Deprecated. misspelled, use getMinAcceptedWordLength() instead

Returns:
the min word lenght accepted by this word2image service

getImageHeight

public int getImageHeight()
Returns:
the generated image height

getImageWidth

public int getImageWidth()
Returns:
the generated image width

getMinFontSize

public int getMinFontSize()
Returns:
the min font size for the generated image

getFont

public java.awt.Font getFont()
Method from imageFromWord method to apply font to String. Implementations must take into account the minFontSize and the MaxFontSize.

Returns:
a Font

getBackground

public java.awt.image.BufferedImage getBackground()
Generates a backround image on wich text will be paste. Implementations must take into account the imageHeigt and imageWidth.

Returns:
the background image


Copyright 2003-2009 JCaptcha. All Rights Reserved.