railo.runtime.img
Class MarpleCaptcha
java.lang.Object
railo.commons.img.AbstractCaptcha
railo.runtime.img.MarpleCaptcha
public class MarpleCaptcha
- extends AbstractCaptcha
DIFFICULTY_LOW
public static final int DIFFICULTY_LOW
- See Also:
- Constant Field Values
DIFFICULTY_MEDIUM
public static final int DIFFICULTY_MEDIUM
- See Also:
- Constant Field Values
DIFFICULTY_HIGH
public static final int DIFFICULTY_HIGH
- See Also:
- Constant Field Values
MarpleCaptcha
public MarpleCaptcha()
generate
public BufferedImage generate(String text,
int width,
int height,
String[] fonts,
boolean useAntiAlias,
Color fontColor,
int fontSize,
int difficulty)
throws CaptchaException
- Description copied from class:
AbstractCaptcha
- generates a Captcha as a Buffered Image file
- Overrides:
generate
in class AbstractCaptcha
- Parameters:
text
- text for the captchawidth
- width of the resulting imageheight
- height of the resulting imagefonts
- list of font used for the captcha (all font are random used)useAntiAlias
- use anti aliasing or notfontColor
- color of the fontfontSize
- size of the fontdifficulty
- difficulty of the reslting captcha
- Returns:
- captcha image
- Throws:
CaptchaException
getFont
public Font getFont(String font,
Font defaultValue)
- Description copied from class:
AbstractCaptcha
- creates a font from given string
- Specified by:
getFont
in class AbstractCaptcha
- Returns:
Copyright © 2012 Railo