com.octo.captcha.component.image.textpaster
Class LineRandomTextPaster
java.lang.Object
com.octo.captcha.component.image.textpaster.AbstractTextPaster
com.octo.captcha.component.image.textpaster.RandomTextPaster
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}
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 wordmaxAcceptedWordLength
- Min length of a wordtextColor
- Unique color of textnumberOfLinesPerGlyph
- Number of lines around glypheslinesColor
- 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 wordmaxAcceptedWordLength
- Min length of a wordcolorGenerator
- Color generatior for the textnumberOfLinesPerGlyph
- Number of lines around glypheslinesColor
- 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 wordmaxAcceptedWordLength
- Min length of a wordcolorGenerator
- Color generatior for the textmanageColorPerGlyph
- Boolean to set if each glyph can have a new color from the color generatornumberOfLinesPerGlyph
- Number of lines around glypheslinesColor
- 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 wordmaxAcceptedWordLength
- Min length of a wordcolorGenerator
- Color generatior for the textmanageColorPerGlyph
- Boolean to set if each glyph can have a new color from the color generatornumberOfLinesPerGlyph
- Number of lines around the glyphlinesColorGenerator
- The color genator for the lines (one color for all lines)
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.