com.octo.captcha.component.image.textpaster
Interface TextPaster

All Known Implementing Classes:
AbstractTextPaster, DecoratedRandomTextPaster, GlyphsPaster, NonLinearRandomAngleTextPaster, NonLinearTextPaster, RandomTextPaster, SimpleTextPaster, VisitedAndDecoratedTextPaster

public interface TextPaster

Used by ComposedWordToImage to paste the word to be distorded on the image background


Method Summary
 int getMaxAcceptedWordLength()
           
 int getMinAcceptedWordLength()
           
 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.
 

Method Detail

getMaxAcceptedWordLength

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

getMinAcceptedWordLength

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

pasteText

java.awt.image.BufferedImage pasteText(java.awt.image.BufferedImage background,
                                       java.text.AttributedString attributedWord)
                                       throws CaptchaException
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.