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

All Known Implementing Classes:
AbstractTextPaster, BaffleRandomTextPaster, DecoratedRandomTextPaster, DoubleRandomTextPaster, DoubleTextPaster, LineRandomTextPaster, NonLinearRandomAngleTextPaster, NonLinearTextPaster, RandomTextPaster, SimpleTextPaster

public interface TextPaster

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


Method Summary
 int getMaxAcceptedWordLenght()
          Deprecated. misspelled, use getMaxAcceptedWordLength() instead
 int getMaxAcceptedWordLength()
           
 int getMinAcceptedWordLenght()
          Deprecated. misspelled, use getMinAcceptedWordLength() instead
 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

getMaxAcceptedWordLenght

int getMaxAcceptedWordLenght()
Deprecated. misspelled, use getMaxAcceptedWordLength() instead

Returns:
the max word lenght accepted by this word2image service

getMinAcceptedWordLenght

int getMinAcceptedWordLenght()
Deprecated. misspelled, use getMinAcceptedWordLength() instead

Returns:
the min word lenght accepted by this word2image service

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.