diff --git a/internal/captcha/dwelling_captcha.go b/internal/captcha/dwelling_captcha.go index dc209e8..97af92c 100644 --- a/internal/captcha/dwelling_captcha.go +++ b/internal/captcha/dwelling_captcha.go @@ -43,8 +43,8 @@ func (c *DwellingCaptcha) generateImage(style string) *image.Image { for i := 0; i < 16; i++ { x0, _ := rand.Int(rand.Reader, big.NewInt(int64(ctx.Height()))) x1, _ := rand.Int(rand.Reader, big.NewInt(int64(ctx.Height()))) - ctx.SetLineWidth(2) r, _ := rand.Int(rand.Reader, big.NewInt(int64(4))) + ctx.SetLineWidth(2) ctx.DrawPoint(float64(x0.Int64()), float64(x1.Int64()), float64(r.Int64())) ctx.DrawLine(float64(x0.Int64()), 0, float64(ctx.Height()), float64(x1.Int64())) ctx.Stroke() @@ -53,10 +53,10 @@ func (c *DwellingCaptcha) generateImage(style string) *image.Image { for i := 0; i < 16; i++ { x0, _ := rand.Int(rand.Reader, big.NewInt(int64(ctx.Height()))) x1, _ := rand.Int(rand.Reader, big.NewInt(int64(ctx.Height()))) - ctx.SetLineWidth(2) - ctx.DrawLine(0, float64(x0.Int64()), float64(x1.Int64()), float64(ctx.Height())) r, _ := rand.Int(rand.Reader, big.NewInt(int64(4))) + ctx.SetLineWidth(2) ctx.DrawPoint(float64(x0.Int64()), float64(x1.Int64()), float64(r.Int64())) + ctx.DrawLine(0, float64(x0.Int64()), float64(x1.Int64()), float64(ctx.Height())) ctx.Stroke() }