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

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


    Integer imageWidth = new Integer(90);
    Integer imageHeight = new Integer(35);
    int fontSize = 21;

    // word generator
    WordGenerator dictionnaryWords = new ComposeDictionaryWordGenerator(new FileDictionary("toddlist"));

    // word2image components
    TextPaster randomPaster = new DecoratedRandomTextPaster(minWordLength, maxWordLength,
        new RandomListColorGenerator(new Color[] { new Color(23, 170, 27), new Color(220, 34, 11),
            new Color(23, 67, 172) }), new TextDecorator[] {});
View Full Code Here


        int maxWordLength = 5;
        int fontSize = 20;
        int imageWidth = 100;
        int imageHeight = 36;

        WordGenerator dictionnaryWords = new ComposeDictionaryWordGenerator(
                new FileDictionary("toddlist"));

        // word2image components
        TextPaster randomPaster = new DecoratedRandomTextPaster(minWordLength,
                maxWordLength, new RandomListColorGenerator(new Color[]{
View Full Code Here

    Integer imageWidth = new Integer(90);
    Integer imageHeight = new Integer(35);
    int fontSize = 21;

    // word generator
    WordGenerator dictionnaryWords = new ComposeDictionaryWordGenerator(new FileDictionary(
        "toddlist"));

    // word2image components
    TextPaster randomPaster = new DecoratedRandomTextPaster(minWordLength, maxWordLength,
        new RandomListColorGenerator(new Color[] { new Color(23, 170, 27),
View Full Code Here

            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

        int maxWordLength = 5;
        int fontSize = 20;
        int imageWidth = 100;
        int imageHeight = 36;

        WordGenerator dictionnaryWords = new ComposeDictionaryWordGenerator(
                new FileDictionary("toddlist"));

        // word2image components
        TextPaster randomPaster = new DecoratedRandomTextPaster(minWordLength,
                maxWordLength, new RandomListColorGenerator(new Color[]{
View Full Code Here

    int fontSize = 50;
    int imageWidth = 250;
    int imageHeight = 100;

    //word generator
    WordGenerator dictionnaryWords = new ComposeDictionaryWordGenerator(new FileDictionary("toddlist"));

    //word2image components
    TextPaster randomPaster = new DecoratedRandomTextPaster(minWordLength, maxWordLength,
        new RandomListColorGenerator(new Color[] { new Color(23, 170, 27), new Color(220, 34, 11),
            new Color(23, 67, 172) }), new TextDecorator[] {});
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

    int minWordLength = 4;
    int maxWordLength = 5;
    int fontSize = 50;
    int imageWidth = 250;
    int imageHeight = 100;
    WordGenerator dictionnaryWords = new ComposeDictionaryWordGenerator(
        new FileDictionary("toddlist"));

    // word2image components
    TextPaster randomPaster = new DecoratedRandomTextPaster(minWordLength,
        maxWordLength, new RandomListColorGenerator(new Color[] {
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

    int fontSize = 30;
    final int imageWidth = 180;
    final int imageHeight = 50;

    //word generator
    WordGenerator dictionnaryWords = new ComposeDictionaryWordGenerator(new FileDictionary("toddlist"));

    //word2image components
    TextPaster randomPaster = new DecoratedRandomTextPaster(minWordLength, maxWordLength,
        new RandomListColorGenerator(new Color[] { new Color(23, 170, 27), new Color(220, 34, 11),
            new Color(23, 67, 172) }), new TextDecorator[] {});
View Full Code Here

TOP

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

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.