From 4c37fa4b41b0cab50a4fc192e9120042dbe36872 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 15 Nov 2021 18:33:35 +0300 Subject: update phpstan to 1.1.2; update php-qrcode to 3.4.1 --- vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php | 12 ++++++------ vendor/chillerlan/php-qrcode/examples/imageWithLogo.php | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'vendor/chillerlan/php-qrcode/examples') diff --git a/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php b/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php index f9d94ae34..76aa5ced7 100644 --- a/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php +++ b/vendor/chillerlan/php-qrcode/examples/QRImageWithLogo.php @@ -41,9 +41,9 @@ class QRImageWithLogo extends QRImage{ } $this->matrix->setLogoSpace( - $this->options->logoWidth, - $this->options->logoHeight - // not utilizing the position here + $this->options->logoSpaceWidth, + $this->options->logoSpaceHeight + // not utilizing the position here ); // there's no need to save the result of dump() into $this->image here @@ -55,9 +55,9 @@ class QRImageWithLogo extends QRImage{ $w = imagesx($im); $h = imagesy($im); - // set new logo size, leave a border of 1 module - $lw = ($this->options->logoWidth - 2) * $this->options->scale; - $lh = ($this->options->logoHeight - 2) * $this->options->scale; + // set new logo size, leave a border of 1 module (no proportional resize/centering) + $lw = ($this->options->logoSpaceWidth - 2) * $this->options->scale; + $lh = ($this->options->logoSpaceHeight - 2) * $this->options->scale; // get the qrcode size $ql = $this->matrix->size() * $this->options->scale; diff --git a/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php b/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php index 987e10c11..36f63d503 100644 --- a/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php +++ b/vendor/chillerlan/php-qrcode/examples/imageWithLogo.php @@ -16,14 +16,15 @@ require_once __DIR__.'/../vendor/autoload.php'; $data = 'https://www.youtube.com/watch?v=DLzxrzFCyOs&t=43s'; /** - * @property int $logoWidth - * @property int $logoHeight + * @property int $logoSpaceWidth + * @property int $logoSpaceHeight * * @noinspection PhpIllegalPsrClassPathInspection */ class LogoOptions extends QROptions{ - protected $logoWidth; - protected $logoHeight; + // size in QR modules, multiply with QROptions::$scale for pixel size + protected $logoSpaceWidth; + protected $logoSpaceHeight; } $options = new LogoOptions; @@ -31,8 +32,8 @@ $options = new LogoOptions; $options->version = 7; $options->eccLevel = QRCode::ECC_H; $options->imageBase64 = false; -$options->logoWidth = 13; -$options->logoHeight = 13; +$options->logoSpaceWidth = 13; +$options->logoSpaceHeight = 13; $options->scale = 5; $options->imageTransparent = false; -- cgit v1.2.3