优化验证码效果

This commit is contained in:
synchronized
2018-07-30 13:10:51 +08:00
parent 74a1991352
commit 92af7138a9
9 changed files with 160 additions and 31 deletions

View File

@@ -67,8 +67,8 @@ public class ChineseCaptcha extends ChineseCaptchaAbstract {
// 画字符串
for (int i = 0; i < len; i++) {
// 计算坐标
int x = i * w + sp + num(-Math.abs(sp), Math.abs(sp));
int y = h + num(-Math.abs(hp), Math.abs(hp));
int x = i * w + sp + num(-5, 5);
int y = h + num(-5, 5);
if (x < 0) {
x = 0;
}