Package com.octo.captcha.component.word.wordgenerator

Examples of com.octo.captcha.component.word.wordgenerator.RandomWordGenerator


            greenRange, blueRange, alphaRange));
    TextPaster textPaster = new RandomTextPaster(acceptedWordLength,
        acceptedWordLength, textColor);
    WordToImage wordToImage = new ComposedWordToImage(fontGenerator,
        backgroundGenerator, textPaster);
    WordGenerator wordGenerator = new RandomWordGenerator(acceptedChars);
    factories = new ImageCaptchaFactory[] { new GimpyFactory(wordGenerator,
        wordToImage) };
  }
View Full Code Here


                    // DeformedRandomFontGenerator(MIN_FONT_SIZE, MAX_FONT_SIZE));// to  
                    // small font  

                    // no char upper O, char lower o and numerric 0 because user cannot  
                    // answer  
                    WordGenerator words = new RandomWordGenerator(NUMERIC_CHARS  
                            + UPPER_ASCII_CHARS);  

                    for (Iterator fontIter = fontGeneratorList.iterator(); fontIter.hasNext();) {  
                        FontGenerator font = (FontGenerator) fontIter.next();  
                        for (Iterator backIter = backgroundGeneratorList.iterator(); backIter .hasNext();) {  
View Full Code Here

    ImageDeformation backDef = new ImageDeformationByFilters(new ImageFilter[0]);
    ImageDeformation textDef = new ImageDeformationByFilters(new ImageFilter[0]);
    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] { water });
    WordToImage word2image = new DeformedComposedWordToImage(shearedFont, back, randomPaster, backDef, textDef, postDef);

    WordGenerator dictionaryWords = new RandomWordGenerator(ERXProperties.stringForKeyWithDefault(WORD_GENERATOR, "BCDFGHJKLMNPQRSTVWXYZbcdfghjklmnpqrstvwxyz2346789"));
    addFactory(new GimpyFactory(dictionaryWords, word2image));
  }
View Full Code Here

TOP

Related Classes of com.octo.captcha.component.word.wordgenerator.RandomWordGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.