Examples of FontGenerator


Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

    // 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[] {});
    BackgroundGenerator background = new UniColorBackgroundGenerator(imageWidth, imageHeight, Color.white);
    FontGenerator font = new RandomFontGenerator(new Integer(fontSize), Integer.valueOf(fontSize),
        new Font[] { new Font("nyala", Font.BOLD, fontSize),
            new Font("Bell MT", Font.PLAIN, fontSize),
            new Font("Credit valley", Font.BOLD, fontSize) });

    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] {});
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

                maxWordLength, new RandomListColorGenerator(new Color[]{
                new Color(23, 170, 27), new Color(220, 34, 11),
                new Color(23, 67, 172)}), new TextDecorator[]{});
        BackgroundGenerator background = new UniColorBackgroundGenerator(
                imageWidth, imageHeight, Color.white);
        FontGenerator font = new RandomFontGenerator(fontSize, fontSize,
                new Font[]{new Font("nyala", Font.BOLD, fontSize),
                        new Font("Bell MT", Font.PLAIN, fontSize),
                        new Font("Credit valley", Font.BOLD, fontSize)});

        ImageDeformation postDef = new ImageDeformationByFilters(
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

    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[] {});
    BackgroundGenerator background = new UniColorBackgroundGenerator(imageWidth, imageHeight,
        Color.white);
    FontGenerator font = new RandomFontGenerator(new Integer(fontSize), Integer
        .valueOf(fontSize), new Font[] { new Font("nyala", Font.BOLD, fontSize),
        new Font("Bell MT", Font.PLAIN, fontSize),
        new Font("Credit valley", Font.BOLD, fontSize) });

    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] {});
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

  public void initialize() {
    int[] redRange = { 204, 255 };
    int[] greenRange = { 204, 255 };
    int[] blueRange = { 204, 255 };
    int[] alphaRange = { 0, 255 };
    FontGenerator fontGenerator = new TwistedAndShearedRandomFontGenerator(
        fontSize, fontSize);
    BackgroundGenerator backgroundGenerator = new FunkyBackgroundGenerator(
        width, height, new RandomRangeColorGenerator(redRange,
            greenRange, blueRange, alphaRange));
    TextPaster textPaster = new RandomTextPaster(acceptedWordLength,
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

                maxWordLength, new RandomListColorGenerator(new Color[]{
                new Color(23, 170, 27), new Color(220, 34, 11),
                new Color(23, 67, 172)}), new TextDecorator[]{});
        BackgroundGenerator background = new UniColorBackgroundGenerator(
                imageWidth, imageHeight, Color.white);
        FontGenerator font = new RandomFontGenerator(fontSize, fontSize,
                new Font[]{new Font("nyala", Font.BOLD, fontSize),
                        new Font("Bell MT", Font.PLAIN, fontSize),
                        new Font("Credit valley", Font.BOLD, fontSize)});

        ImageDeformation postDef = new ImageDeformationByFilters(
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

    //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[] {});
    BackgroundGenerator background = new UniColorBackgroundGenerator(imageWidth, imageHeight, Color.white);
    FontGenerator font = new RandomFontGenerator(fontSize, fontSize, new Font[] {
        new Font("nyala", Font.BOLD, fontSize), new Font("Bell MT", Font.PLAIN, fontSize),
        new Font("Credit valley", Font.BOLD, fontSize) });

    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation backDef = new ImageDeformationByFilters(new ImageFilter[] {});
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

                    // 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();) {  
                            BackgroundGenerator back = (BackgroundGenerator) backIter.next();  
                            for (Iterator textIter = textPasterList.iterator(); textIter.hasNext();) {  
                                TextPaster parser = (TextPaster) textIter.next();  
                                WordToImage word2image = new ComposedWordToImage(font,back, parser);  
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

        maxWordLength, new RandomListColorGenerator(new Color[] {
            new Color(23, 170, 27), new Color(220, 34, 11),
            new Color(23, 67, 172) }), new TextDecorator[] {});
    BackgroundGenerator background = new UniColorBackgroundGenerator(
        imageWidth, imageHeight, Color.white);
    FontGenerator font = new RandomFontGenerator(fontSize, fontSize,
        new Font[] { new Font("nyala", Font.BOLD, fontSize),
            new Font("Bell MT", Font.PLAIN, fontSize),
            new Font("Credit valley", Font.BOLD, fontSize) });
    ImageDeformation postDef = new ImageDeformationByFilters(
        new ImageFilter[] {});
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

    water.setAmplitude(1);
    water.setAntialias(true);
    water.setPhase(10);
    water.setWavelength(70);

    FontGenerator shearedFont = new RandomFontGenerator(Integer.valueOf(30), Integer.valueOf(35));
    // BackgroundGenerator back = new UniColorBackgroundGenerator(Integer.valueOf(250), Integer.valueOf(150), Color.white);
    BackgroundGenerator back = new FunkyBackgroundGenerator(Integer.valueOf(250), Integer.valueOf(150));
    RandomRangeColorGenerator randomWordColorGenerator = new RandomRangeColorGenerator(new int[] { 10, 30 }, new int[] { 10, 40 }, new int[] { 10, 12 });
    RandomRangeColorGenerator randomBaffleColorGenerator = new RandomRangeColorGenerator(new int[] { 70, 120 }, new int[] { 50, 90 }, new int[] { 90, 150 }, new int[] { 100, 200 });
    TextPaster randomPaster = new DecoratedRandomTextPaster(Integer.valueOf(6), Integer.valueOf(7), randomWordColorGenerator, new TextDecorator[] { new BaffleTextDecorator(Integer.valueOf(1), randomBaffleColorGenerator) });
View Full Code Here

Examples of com.octo.captcha.component.image.fontgenerator.FontGenerator

                        g2d.dispose();
                        return image;
                    }
                   
                };
    FontGenerator font = new RandomFontGenerator(fontSize-5, fontSize, new Font[] {
        new Font("nyala", Font.BOLD, fontSize)});

    ImageDeformation postDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation backDef = new ImageDeformationByFilters(new ImageFilter[] {});
    ImageDeformation textDef = new ImageDeformationByFilters(new ImageFilter[] {});
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.