反SPAM新思路—换Z-BLOG的验证码!(8)
ii = 0
For i = 0 To deltaT
ary(0,i) = x1 + dx * i \ deltaT
ary(1,i) = y1 + dy * i \ deltaT
If pcd_getDot(ary(0,i),ary(1,i),str,UnitWidth) = "0" Then ii = ii + 1
Next
' 统计连线上有效点的数量,如未超过有效点上限则跳出循环,执行干扰
If ii <= DotsLimit Then Exit For
End If
Next
' 执行干扰(dx,dy改作不同的方向标记用)
If Abs(dx) > Abs(dy) Then dx = 1 Else dx = 0
If dx = 1 Then
If Int(Rnd*10) > 4 Then
dy = 1
way = -1
Else
dy = UnitHeight - 2
way = 1
End If
Else
If Int(Rnd*10) > 4 Then
dy = 1
way = -1
Else
内容版权声明:除非注明,否则皆为本站原创文章。