com.octo.captcha.component.image.textpaster
Class LineRandomTextPaster

java.lang.Object
  extended by com.octo.captcha.component.image.textpaster.AbstractTextPaster
      extended by com.octo.captcha.component.image.textpaster.RandomTextPaster
          extended by com.octo.captcha.component.image.textpaster.LineRandomTextPaster
All Implemented Interfaces:
TextPaster

Deprecated. use the DecoratedRandomTextPaster instead

public class LineRandomTextPaster
extends RandomTextPaster

text paster that paint white lines on the string

You may specify the number of line per glyph : 3 by default. You may specify the color of lines : TextColor by default.

See Also:
{http://www.parc.xerox.com/research/istl/projects/captcha/default.html}

Field Summary
 
Fields inherited from class com.octo.captcha.component.image.textpaster.RandomTextPaster
kerning, textColors
 
Fields inherited from class com.octo.captcha.component.image.textpaster.AbstractTextPaster
myRandom
 
Constructor Summary
LineRandomTextPaster(java.lang.Integer minAcceptedWordLength, java.lang.Integer maxAcceptedWordLength, ColorGenerator colorGenerator, java.lang.Boolean manageColorPerGlyph, java.lang.Integer numberOfLinesPerGlyph, java.awt.Color linesColor)
          Deprecated.  
LineRandomTextPaster(java.lang.Integer minAcceptedWordLength, java.lang.Integer maxAcceptedWordLength, ColorGenerator colorGenerator, java.lang.Boolean manageColorPerGlyph, java.lang.Integer numberOfLinesPerGlyph, ColorGenerator linesColorGenerator)
          Deprecated.  
LineRandomTextPaster(java.lang.Integer minAcceptedWordLength, java.lang.Integer maxAcceptedWordLength, ColorGenerator colorGenerator, java.lang.Integer numberOfLinesPerGlyph, java.awt.Color linesColor)
          Deprecated.  
LineRandomTextPaster(java.lang.Integer minAcceptedWordLength, java.lang.Integer maxAcceptedWordLength, java.awt.Color textColor, java.lang.Integer numberOfLinesPerGlyph, java.awt.Color linesColor)
          Deprecated.  
 
Method Summary
 java.awt.image.BufferedImage pasteText(java.awt.image.BufferedImage background, java.text.AttributedString attributedWord)
          Deprecated. Pastes the attributed string on the backround image and return the final image.
 
Methods inherited from class com.octo.captcha.component.image.textpaster.AbstractTextPaster
getColorGenerator, getMaxAcceptedWordLenght, getMaxAcceptedWordLength, getMinAcceptedWordLenght, getMinAcceptedWordLength, isManageColorPerGlyph, setColorGenerator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineRandomTextPaster

public LineRandomTextPaster(java.lang.Integer minAcceptedWordLength,
                            java.lang.Integer maxAcceptedWordLength,
                            java.awt.Color textColor,
                            java.lang.Integer numberOfLinesPerGlyph,
                            java.awt.Color linesColor)
Deprecated. 
Parameters:
minAcceptedWordLength - Max length of a word
maxAcceptedWordLength - Min length of a word
textColor - Unique color of text
numberOfLinesPerGlyph - Number of lines around glyphes
linesColor - Color of the lines

LineRandomTextPaster

public LineRandomTextPaster(java.lang.Integer minAcceptedWordLength,
                            java.lang.Integer maxAcceptedWordLength,
                            ColorGenerator colorGenerator,
                            java.lang.Integer numberOfLinesPerGlyph,
                            java.awt.Color linesColor)
Deprecated. 
Parameters:
minAcceptedWordLength - Max length of a word
maxAcceptedWordLength - Min length of a word
colorGenerator - Color generatior for the text
numberOfLinesPerGlyph - Number of lines around glyphes
linesColor - The color for the lines (one color for all lines)

LineRandomTextPaster

public LineRandomTextPaster(java.lang.Integer minAcceptedWordLength,
                            java.lang.Integer maxAcceptedWordLength,
                            ColorGenerator colorGenerator,
                            java.lang.Boolean manageColorPerGlyph,
                            java.lang.Integer numberOfLinesPerGlyph,
                            java.awt.Color linesColor)
Deprecated. 
Parameters:
minAcceptedWordLength - Max length of a word
maxAcceptedWordLength - Min length of a word
colorGenerator - Color generatior for the text
manageColorPerGlyph - Boolean to set if each glyph can have a new color from the color generator
numberOfLinesPerGlyph - Number of lines around glyphes
linesColor - The color genator for the lines (one color for all lines)

LineRandomTextPaster

public LineRandomTextPaster(java.lang.Integer minAcceptedWordLength,
                            java.lang.Integer maxAcceptedWordLength,
                            ColorGenerator colorGenerator,
                            java.lang.Boolean manageColorPerGlyph,
                            java.lang.Integer numberOfLinesPerGlyph,
                            ColorGenerator linesColorGenerator)
Deprecated. 
Parameters:
minAcceptedWordLength - Max length of a word
maxAcceptedWordLength - Min length of a word
colorGenerator - Color generatior for the text
manageColorPerGlyph - Boolean to set if each glyph can have a new color from the color generator
numberOfLinesPerGlyph - Number of lines around the glyph
linesColorGenerator - The color genator for the lines (one color for all lines)
Method Detail

pasteText

public java.awt.image.BufferedImage pasteText(java.awt.image.BufferedImage background,
                                              java.text.AttributedString attributedWord)
                                       throws CaptchaException
Deprecated. 
Pastes the attributed string on the backround image and return the final image. Implementation must take into account the fact that the text must be readable by human and non by programs

Specified by:
pasteText in interface TextPaster
Overrides:
pasteText in class RandomTextPaster
Returns:
the final image
Throws:
CaptchaException - if any exception accurs during paste routine.


Copyright 2003-2009 JCaptcha. All Rights Reserved.