|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.octo.captcha.component.image.wordtoimage.AbstractWordToImage
com.octo.captcha.component.image.wordtoimage.ComposedWordToImage
com.octo.captcha.component.image.wordtoimage.DeformedComposedWordToImage
public class DeformedComposedWordToImage
This implementation uses deformation components to distord the image. It takes three array of deformations : for the background image, for the text only, and for the final image it proceeds as folows :
Constructor Summary | |
---|---|
DeformedComposedWordToImage(boolean manageFontByCharacter,
FontGenerator fontGenerator,
BackgroundGenerator background,
TextPaster textPaster,
java.util.List<ImageDeformation> backgroundDeformations,
java.util.List<ImageDeformation> textDeformations,
java.util.List<ImageDeformation> finalDeformations)
|
|
DeformedComposedWordToImage(FontGenerator fontGenerator,
BackgroundGenerator background,
TextPaster textPaster,
ImageDeformation backgroundDeformation,
ImageDeformation textDeformation,
ImageDeformation finalDeformation)
Composed word to image that applys filters |
|
DeformedComposedWordToImage(FontGenerator fontGenerator,
BackgroundGenerator background,
TextPaster textPaster,
java.util.List<ImageDeformation> backgroundDeformations,
java.util.List<ImageDeformation> textDeformations,
java.util.List<ImageDeformation> finalDeformations)
Composed word to image that applys filters |
Method Summary | |
---|---|
java.awt.image.BufferedImage |
getImage(java.lang.String word)
Creates an image of the provided String This method is a skeleton for creation algorithm. |
Methods inherited from class com.octo.captcha.component.image.wordtoimage.ComposedWordToImage |
---|
getImageHeight, getImageWidth, getMaxAcceptedWordLenght, getMaxAcceptedWordLength, getMinAcceptedWordLenght, getMinAcceptedWordLength, getMinFontSize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeformedComposedWordToImage(FontGenerator fontGenerator, BackgroundGenerator background, TextPaster textPaster, ImageDeformation backgroundDeformation, ImageDeformation textDeformation, ImageDeformation finalDeformation)
fontGenerator
- a AbstractFontGenerator to implement the getFont() methodbackground
- a AbstractBackgroundGenerator to implement the getBackround() methodtextPaster
- a AbstractTextParser to implement the pasteText() methodbackgroundDeformation
- to be apply on the background imagetextDeformation
- to be apply on the text imagefinalDeformation
- to be apply on the final imagepublic DeformedComposedWordToImage(FontGenerator fontGenerator, BackgroundGenerator background, TextPaster textPaster, java.util.List<ImageDeformation> backgroundDeformations, java.util.List<ImageDeformation> textDeformations, java.util.List<ImageDeformation> finalDeformations)
fontGenerator
- a AbstractFontGenerator to implement the getFont() methodbackground
- a AbstractBackgroundGenerator to implement the getBackround() methodtextPaster
- a AbstractTextParser to implement the pasteText() methodbackgroundDeformations
- to be apply on the background imagetextDeformations
- to be apply on the text imagefinalDeformations
- to be apply on the final imagepublic DeformedComposedWordToImage(boolean manageFontByCharacter, FontGenerator fontGenerator, BackgroundGenerator background, TextPaster textPaster, java.util.List<ImageDeformation> backgroundDeformations, java.util.List<ImageDeformation> textDeformations, java.util.List<ImageDeformation> finalDeformations)
Method Detail |
---|
public java.awt.image.BufferedImage getImage(java.lang.String word) throws CaptchaException
getImage
in interface WordToImage
getImage
in class AbstractWordToImage
CaptchaException
- if word is invalid or if image generation fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |