Fix and update Composer autoload
This commit is contained in:
committed by
Frédéric Guillot
parent
3e139ab6f4
commit
4cfdb88813
1
vendor/gregwar/captcha/.gitignore
vendored
1
vendor/gregwar/captcha/.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
.idea/
|
||||
demo/*.jpg
|
||||
demo/*.pgm
|
||||
demo/temp/
|
||||
|
||||
@@ -28,6 +28,11 @@ class CaptchaBuilder implements CaptchaBuilderInterface
|
||||
*/
|
||||
protected $textColor = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $lineColor = null;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
@@ -229,6 +234,13 @@ class CaptchaBuilder implements CaptchaBuilderInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setLineColor($r, $g, $b)
|
||||
{
|
||||
$this->lineColor = array($r, $g, $b);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the ignoreAllEffects value
|
||||
*
|
||||
@@ -257,8 +269,18 @@ class CaptchaBuilder implements CaptchaBuilderInterface
|
||||
*/
|
||||
protected function drawLine($image, $width, $height, $tcol = null)
|
||||
{
|
||||
if ($this->lineColor === null) {
|
||||
$red = $this->rand(100, 255);
|
||||
$green = $this->rand(100, 255);
|
||||
$blue = $this->rand(100, 255);
|
||||
} else {
|
||||
$red = $this->lineColor[0];
|
||||
$green = $this->lineColor[1];
|
||||
$blue = $this->lineColor[2];
|
||||
}
|
||||
|
||||
if ($tcol === null) {
|
||||
$tcol = imagecolorallocate($image, $this->rand(100, 255), $this->rand(100, 255), $this->rand(100, 255));
|
||||
$tcol = imagecolorallocate($image, $red, $green, $blue);
|
||||
}
|
||||
|
||||
if ($this->rand(0, 1)) { // Horizontal
|
||||
|
||||
Reference in New Issue
Block a user