去除干扰点和线
This commit is contained in:
@@ -89,21 +89,6 @@
|
||||
ctx.rotate(-deg * Math.PI / 180);
|
||||
ctx.translate(-x, -y);
|
||||
}
|
||||
/**绘制干扰线**/
|
||||
for(var i = 0; i < 4; i++) {
|
||||
ctx.strokeStyle = randomColor(40, 180);
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(randomNum(0, this.options.width), randomNum(0, this.options.height));
|
||||
ctx.lineTo(randomNum(0, this.options.width), randomNum(0, this.options.height));
|
||||
ctx.stroke();
|
||||
}
|
||||
/**绘制干扰点**/
|
||||
for(var i = 0; i < this.options.width/4; i++) {
|
||||
ctx.fillStyle = randomColor(0, 255);
|
||||
ctx.beginPath();
|
||||
ctx.arc(randomNum(0, this.options.width), randomNum(0, this.options.height), 1, 0, 2 * Math.PI);
|
||||
ctx.fill();
|
||||
}
|
||||
},
|
||||
|
||||
/**验证验证码**/
|
||||
|
||||
Reference in New Issue
Block a user