image: remove random variations in drawDigit's x,y. For the standard size and width with new font they no longer had any effect anyway (were always +0).
Dmitry Chestnykh dmitry@codingrobots.com
Wed, 27 Apr 2011 23:37:21 +0200
1 files changed,
3 insertions(+),
5 deletions(-)
jump to
M
image.go
→
image.go
@@ -14,7 +14,7 @@ const (
// Standard width and height of a captcha image. StdWidth = 240 StdHeight = 80 - + // Maximum absolute skew factor of a single digit. maxSkew = 0.7 )@@ -181,10 +181,8 @@ for xx := 0; xx < fontWidth; xx++ {
if digit[yy*fontWidth+xx] != blackChar { continue } - // Introduce random variations. - ox := x + (xx * img.dotSize) + rnd(0, r/2) - oy := y + (yy * img.dotSize) + rnd(0, r/2) - + ox := x + xx*img.dotSize + oy := y + yy*img.dotSize img.drawCircle(img.primaryColor, ox, oy, r) } xs += skf