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; }
public ConfigurableCaptchaService() { backgroundFactory = new SingleColorBackgroundFactory(); wordFactory = new AdaptiveRandomWordFactory(); fontFactory = new RandomFontFactory(); textRenderer = new BestFitTextRenderer(); colorFactory = new SingleColorFactory(); filterFactory = new CurvesRippleFilterFactory(colorFactory); textRenderer.LeftMargin = 10; textRenderer.RightMargin = 10; width = 160; height = 70; }