【add】添加验证码前的干扰线
This commit is contained in:
+4
@@ -117,6 +117,10 @@ public class RandImageUtil {
|
|||||||
// 设置字符,字符间距,上边距
|
// 设置字符,字符间距,上边距
|
||||||
graphics.drawString(String.valueOf(resultCode.charAt(i)), (23 * i) + 8, 26);
|
graphics.drawString(String.valueOf(resultCode.charAt(i)), (23 * i) + 8, 26);
|
||||||
}
|
}
|
||||||
|
for(int i = 0; i < 4; i++){
|
||||||
|
graphics.setColor(getRandColor(0, 256));
|
||||||
|
graphics.drawLine(0, random.nextInt(height), width, random.nextInt(height));
|
||||||
|
}
|
||||||
// 图象生效
|
// 图象生效
|
||||||
graphics.dispose();
|
graphics.dispose();
|
||||||
return image;
|
return image;
|
||||||
|
|||||||
Reference in New Issue
Block a user