com.octo.captcha.component.image.textpaster
Class BaffleRandomTextPaster
java.lang.Object
com.octo.captcha.component.image.textpaster.AbstractTextPaster
com.octo.captcha.component.image.textpaster.RandomTextPaster
com.octo.captcha.component.image.textpaster.BaffleRandomTextPaster
- All Implemented Interfaces:
- TextPaster
Deprecated. use the DecoratedRandomTextPaster
instead
public class BaffleRandomTextPaster
- extends RandomTextPaster
text paster that paint white holes on the string (erase some parts) You may specify the number of holes per
glyph : 3 by default. You may specify the color of holes : TextColor by default.
- See Also:
{http://www.parc.xerox.com/research/istl/projects/captcha/default.html}
Constructor Summary |
BaffleRandomTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph,
java.lang.Integer numberOfHolesPerGlyph,
java.awt.Color holesColor)
Deprecated. |
BaffleRandomTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph,
java.lang.Integer numberOfHolesPerGlyph,
ColorGenerator holesColorGenerator)
Deprecated. |
BaffleRandomTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Integer numberOfHolesPerGlyph,
java.awt.Color holesColor)
Deprecated. |
BaffleRandomTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
java.awt.Color textColor,
java.lang.Integer numberOfHolesPerGlyph,
java.awt.Color holesColor)
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 |
BaffleRandomTextPaster
public BaffleRandomTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
java.awt.Color textColor,
java.lang.Integer numberOfHolesPerGlyph,
java.awt.Color holesColor)
- Deprecated.
- Parameters:
minAcceptedWordLength
- Max length of a wordmaxAcceptedWordLength
- Min length of a wordtextColor
- Unique color of textholesColor
- Color of the holes
BaffleRandomTextPaster
public BaffleRandomTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Integer numberOfHolesPerGlyph,
java.awt.Color holesColor)
- Deprecated.
- Parameters:
minAcceptedWordLength
- Max length of a wordmaxAcceptedWordLength
- Min length of a wordcolorGenerator
- Color generatior for the textnumberOfHolesPerGlyph
- Number of holes around glyphesholesColor
- The color for the glyphs (one color for all glyphes)
BaffleRandomTextPaster
public BaffleRandomTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph,
java.lang.Integer numberOfHolesPerGlyph,
java.awt.Color holesColor)
- 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 generatornumberOfHolesPerGlyph
- Number of holes around glyphesholesColor
- The color for the glyphs (one color for all glyphes)
BaffleRandomTextPaster
public BaffleRandomTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph,
java.lang.Integer numberOfHolesPerGlyph,
ColorGenerator holesColorGenerator)
- 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 generatornumberOfHolesPerGlyph
- Number of holes around the glyphholesColorGenerator
- The color genator for the glyphs (one color for all glyph)
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.