diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-07-27 10:05:23 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-07-27 10:05:23 +0200 |
| commit | 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab (patch) | |
| tree | 39a1a4629749056191c05dfd899f931701b7acf3 /srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php | |
| parent | 5afd237bbd22028b85532b8c0b3fcead49a00764 (diff) | |
| download | ft_server-master.tar.gz ft_server-master.tar.bz2 ft_server-master.zip | |
Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my famillyHEADmaster
Diffstat (limited to 'srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php')
| -rw-r--r-- | srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php | 168 |
1 files changed, 0 insertions, 168 deletions
diff --git a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php b/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php deleted file mode 100644 index d54268e..0000000 --- a/srcs/phpmyadmin/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php -declare(strict_types = 1); - -namespace BaconQrCode\Renderer\RendererStyle; - -use BaconQrCode\Exception\RuntimeException; -use BaconQrCode\Renderer\Color\ColorInterface; -use BaconQrCode\Renderer\Color\Gray; - -final class Fill -{ - /** - * @var ColorInterface - */ - private $backgroundColor; - - /** - * @var ColorInterface|null - */ - private $foregroundColor; - - /** - * @var Gradient|null - */ - private $foregroundGradient; - - /** - * @var EyeFill - */ - private $topLeftEyeFill; - - /** - * @var EyeFill - */ - private $topRightEyeFill; - - /** - * @var EyeFill - */ - private $bottomLeftEyeFill; - - /** - * @var self|null - */ - private static $default; - - private function __construct( - ColorInterface $backgroundColor, - ?ColorInterface $foregroundColor, - ?Gradient $foregroundGradient, - EyeFill $topLeftEyeFill, - EyeFill $topRightEyeFill, - EyeFill $bottomLeftEyeFill - ) { - $this->backgroundColor = $backgroundColor; - $this->foregroundColor = $foregroundColor; - $this->foregroundGradient = $foregroundGradient; - $this->topLeftEyeFill = $topLeftEyeFill; - $this->topRightEyeFill = $topRightEyeFill; - $this->bottomLeftEyeFill = $bottomLeftEyeFill; - } - - public static function default() : self - { - return self::$default ?: self::$default = self::uniformColor(new Gray(100), new Gray(0)); - } - - public static function withForegroundColor( - ColorInterface $backgroundColor, - ColorInterface $foregroundColor, - EyeFill $topLeftEyeFill, - EyeFill $topRightEyeFill, - EyeFill $bottomLeftEyeFill - ) : self { - return new self( - $backgroundColor, - $foregroundColor, - null, - $topLeftEyeFill, - $topRightEyeFill, - $bottomLeftEyeFill - ); - } - - public static function withForegroundGradient( - ColorInterface $backgroundColor, - Gradient $foregroundGradient, - EyeFill $topLeftEyeFill, - EyeFill $topRightEyeFill, - EyeFill $bottomLeftEyeFill - ) : self { - return new self( - $backgroundColor, - null, - $foregroundGradient, - $topLeftEyeFill, - $topRightEyeFill, - $bottomLeftEyeFill - ); - } - - public static function uniformColor(ColorInterface $backgroundColor, ColorInterface $foregroundColor) : self - { - return new self( - $backgroundColor, - $foregroundColor, - null, - EyeFill::inherit(), - EyeFill::inherit(), - EyeFill::inherit() - ); - } - - public static function uniformGradient(ColorInterface $backgroundColor, Gradient $foregroundGradient) : self - { - return new self( - $backgroundColor, - null, - $foregroundGradient, - EyeFill::inherit(), - EyeFill::inherit(), - EyeFill::inherit() - ); - } - - public function hasGradientFill() : bool - { - return null !== $this->foregroundGradient; - } - - public function getBackgroundColor() : ColorInterface - { - return $this->backgroundColor; - } - - public function getForegroundColor() : ColorInterface - { - if (null === $this->foregroundColor) { - throw new RuntimeException('Fill uses a gradient, thus no foreground color is available'); - } - - return $this->foregroundColor; - } - - public function getForegroundGradient() : Gradient - { - if (null === $this->foregroundGradient) { - throw new RuntimeException('Fill uses a single color, thus no foreground gradient is available'); - } - - return $this->foregroundGradient; - } - - public function getTopLeftEyeFill() : EyeFill - { - return $this->topLeftEyeFill; - } - - public function getTopRightEyeFill() : EyeFill - { - return $this->topRightEyeFill; - } - - public function getBottomLeftEyeFill() : EyeFill - { - return $this->bottomLeftEyeFill; - } -} |
