Package cn.dreampie.captcha.color

Examples of cn.dreampie.captcha.color.SingleColorFactory


  public SimpleCaptchaService(int width, int height, Color textColor, Color backgroundColor, int fontSize, FilterFactory ff) {
    backgroundFactory = new SingleColorBackgroundFactory(backgroundColor);
    wordFactory = new AdaptiveRandomWordFactory();
    fontFactory = new RandomFontFactory();
    textRenderer = new BestFitTextRenderer();
    colorFactory = new SingleColorFactory(textColor);
    filterFactory = ff;
    this.width = width;
    this.height = height;
  }
View Full Code Here


  public SimpleCaptchaService(int width, int height, Color textColor, Color backgroundColor, int fontSize, String[] fontNames, FilterFactory ff) {
    backgroundFactory = new SingleColorBackgroundFactory(backgroundColor);
    wordFactory = new AdaptiveRandomWordFactory();
    fontFactory = new RandomFontFactory(fontNames);
    textRenderer = new BestFitTextRenderer();
    colorFactory = new SingleColorFactory(textColor);
    filterFactory = ff;
    this.width = width;
    this.height = height;
  }
View Full Code Here

public class SingleColorBackgroundFactory implements BackgroundFactory {

  private ColorFactory colorFactory;

  public SingleColorBackgroundFactory() {
    SingleColorFactory scf = new SingleColorFactory(Color.WHITE);
    colorFactory = scf;
  }
View Full Code Here

    SingleColorFactory scf = new SingleColorFactory(Color.WHITE);
    colorFactory = scf;
  }

  public SingleColorBackgroundFactory(Color color) {
    colorFactory = new SingleColorFactory(color);
  }
View Full Code Here

  public ConfigurableCaptchaService() {
    backgroundFactory = new SingleColorBackgroundFactory();
    wordFactory = new AdaptiveRandomWordFactory();
    fontFactory = new RandomFontFactory();
    textRenderer = new BestFitTextRenderer();
    colorFactory = new SingleColorFactory();
    filterFactory = new CurvesRippleFilterFactory(colorFactory);
    textRenderer.setLeftMargin(10);
    textRenderer.setRightMargin(10);
    width = 160;
    height = 70;
View Full Code Here

TOP

Related Classes of cn.dreampie.captcha.color.SingleColorFactory

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.