com.octo.captcha.component.image.textpaster
Class GlyphsPaster
java.lang.Object
com.octo.captcha.component.image.textpaster.AbstractTextPaster
com.octo.captcha.component.image.textpaster.GlyphsPaster
- All Implemented Interfaces:
- TextPaster
public class GlyphsPaster
- extends AbstractTextPaster
Use Glyphs to draw, much more powerfull and efficient than using AttributedString
Constructor Summary |
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
java.awt.Color textColor)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph,
GlyphsVisitors[] glyphVisitors)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph,
GlyphsVisitors[] glyphVisitors,
GlyphsDecorator[] glyphsDecorators)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
GlyphsVisitors[] glyphVisitors)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
GlyphsVisitors[] glyphVisitors,
GlyphsDecorator[] glyphsDecorators)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
java.awt.Color textColor,
GlyphsVisitors[] glyphVisitors)
|
GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
GlyphsVisitors[] glyphVisitors)
|
Method Summary |
java.awt.image.BufferedImage |
pasteText(java.awt.image.BufferedImage background,
java.text.AttributedString attributedWord)
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 |
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
java.awt.Color textColor)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
GlyphsVisitors[] glyphVisitors)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
java.awt.Color textColor,
GlyphsVisitors[] glyphVisitors)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
GlyphsVisitors[] glyphVisitors)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
GlyphsVisitors[] glyphVisitors,
GlyphsDecorator[] glyphsDecorators)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph,
GlyphsVisitors[] glyphVisitors)
GlyphsPaster
public GlyphsPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph,
GlyphsVisitors[] glyphVisitors,
GlyphsDecorator[] glyphsDecorators)
pasteText
public java.awt.image.BufferedImage pasteText(java.awt.image.BufferedImage background,
java.text.AttributedString attributedWord)
throws CaptchaException
- Description copied from interface:
TextPaster
- 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
- Returns:
- the final image
- Throws:
CaptchaException
- if any exception accurs during paste routine.
Copyright 2003-2009 JCaptcha. All Rights Reserved.