Skip to content

Commit 70fc129

Browse files
authored
Merge pull request #317 from neccohuang/fix-lineWidth-lineColor
fix: lineWidth & lineColor
2 parents 06a28c6 + 1fd2cd6 commit 70fc129

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Captcha.php

+12-2
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,16 @@ class Captcha
117117
*/
118118
protected $lines = 3;
119119

120+
/**
121+
* @var int
122+
*/
123+
protected $lineWidth = 2;
124+
125+
/**
126+
* @var string
127+
*/
128+
protected $lineColor = 'ff00ff';
129+
120130
/**
121131
* @var string
122132
*/
@@ -456,8 +466,8 @@ protected function lines()
456466
$this->image->drawLine(function (LineFactory $line) use ($i) {
457467
$line->from(rand(0, $this->image->width()) + $i * rand(0, $this->image->height()) , rand(0, $this->image->height()));
458468
$line->to( rand(0, $this->image->width()), rand(0, $this->image->height()));
459-
$line->color('ff00ff'); // color of line
460-
$line->width(5); // line width in pixels
469+
$line->color($this->lineColor); // color of line
470+
$line->width($this->lineWidth); // line width in pixels
461471
});
462472
}
463473

0 commit comments

Comments
 (0)