类 ChineseGifCaptcha
java.lang.Object
io.springboot.captcha.base.Randoms
io.springboot.captcha.base.Captcha
io.springboot.captcha.base.ChineseCaptchaAbstract
io.springboot.captcha.ChineseGifCaptcha
-
字段概要
从类继承的字段 io.springboot.captcha.base.ChineseCaptchaAbstract
DELTA从类继承的字段 io.springboot.captcha.base.Captcha
chars, charType, COLOR, FONT_1, FONT_10, FONT_2, FONT_3, FONT_4, FONT_5, FONT_6, FONT_7, FONT_8, FONT_9, height, len, TYPE_DEFAULT, TYPE_NUM_AND_UPPER, TYPE_ONLY_CHAR, TYPE_ONLY_LOWER, TYPE_ONLY_NUMBER, TYPE_ONLY_UPPER, width从类继承的字段 io.springboot.captcha.base.Randoms
ALPHA, charMaxIndex, charMinIndex, lowerMaxIndex, lowerMinIndex, numMaxIndex, RANDOM, upperMaxIndex, upperMinIndex -
构造器概要
构造器构造器说明ChineseGifCaptcha(int width, int height) ChineseGifCaptcha(int width, int height, int len) ChineseGifCaptcha(int width, int height, int len, Font font) -
方法概要
修饰符和类型方法说明private floatgetAlpha(int i, int j) 获取透明度,从0到1,自动计算步长获取图片类型private BufferedImagegraphicsImage(Color[] fontColor, char[] strs, int flag, int[][] besselXY) 画随机码图booleanout(OutputStream os) 验证码输出,抽象方法,由子类实现toBase64()输出base64编码从类继承的方法 io.springboot.captcha.base.ChineseCaptchaAbstract
alphaHan, alphas
-
构造器详细资料
-
ChineseGifCaptcha
public ChineseGifCaptcha() -
ChineseGifCaptcha
public ChineseGifCaptcha(int width, int height) -
ChineseGifCaptcha
public ChineseGifCaptcha(int width, int height, int len) -
ChineseGifCaptcha
-
-
方法详细资料
-
out
从类复制的说明:Captcha验证码输出,抽象方法,由子类实现 -
toBase64
从类复制的说明:Captcha输出base64编码 -
getContentType
从类复制的说明:Captcha获取图片类型- 指定者:
getContentType在类中Captcha- 返回:
- 图片格式,MIME类型
-
graphicsImage
画随机码图- 参数:
fontColor- 随机字体颜色strs- 字符数组flag- 透明度besselXY- 干扰线参数- 返回:
- BufferedImage
-
getAlpha
private float getAlpha(int i, int j) 获取透明度,从0到1,自动计算步长- 参数:
i-j-- 返回:
- 透明度
-