From: Raphaƫl Gertz Date: Fri, 10 Nov 2023 14:42:19 +0000 (+0100) Subject: Add captcha background, fill, font size, stroke and stroke width members X-Git-Tag: 0.3.0~4 X-Git-Url: https://git.rapsys.eu/packbundle/commitdiff_plain/a0240be25bbfb5d92e53282bed678aa192673465?hp=368d8a6320af4d5e8c1d8e8a89239b207593c5b9 Add captcha background, fill, font size, stroke and stroke width members --- diff --git a/Util/ImageUtil.php b/Util/ImageUtil.php index 8e111b9..c43c96d 100644 --- a/Util/ImageUtil.php +++ b/Util/ImageUtil.php @@ -99,6 +99,31 @@ class ImageUtil { //Captcha stroke width protected int $captchaStrokeWidth; + /** + * The captcha background + */ + public string $captchaBackground; + + /** + * The captcha fill + */ + public string $captchaFill; + + /** + * The captcha font size + */ + public int $captchaFontSize; + + /** + * The captcha stroke + */ + public string $captchaStroke; + + /** + * The captcha stroke width + */ + public int $captchaStrokeWidth; + /** * Creates a new image util * @@ -108,23 +133,23 @@ class ImageUtil { * @param string $path The public path * @param string $prefix The prefix */ - function __construct(RouterInterface $router, SluggerUtil $slugger, string $cache = '../var/cache', string $path = './bundles/rapsyspack', string $prefix = 'image', $captchaBackground = self::captchaBackground, $captchaFill = self::captchaFill, $captchaFontSize = self::captchaFontSize, $captchaStroke = self::captchaStroke, $captchaStrokeWidth = self::captchaStrokeWidth) { + function __construct(RouterInterface $router, SluggerUtil $slugger, string $cache = '../var/cache', string $path = './bundles/rapsyspack', string $prefix = 'image', string $captchaBackground = self::captchaBackground, string $captchaFill = self::captchaFill, int $captchaFontSize = self::captchaFontSize, string $captchaStroke = self::captchaStroke, int $captchaStrokeWidth = self::captchaStrokeWidth) { //Set cache $this->cache = $cache.'/'.$prefix; - //set captcha background + //Set captcha background $this->captchaBackground = $captchaBackground; - //set captcha fill + //Set captcha fill $this->captchaFill = $captchaFill; - //set captcha font size + //Set captcha font size $this->captchaFontSize = $captchaFontSize; - //set captcha stroke + //Set captcha stroke $this->captchaStroke = $captchaStroke; - //set captcha stroke width + //Set captcha stroke width $this->captchaStrokeWidth = $captchaStrokeWidth; //Set path