���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home/rickpfrv/tie.cx/vendor/endroid/qr-code/src/Matrix/Matrix.php
���ѧ٧ѧ�
<?php declare(strict_types=1); namespace Endroid\QrCode\Matrix; use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeEnlarge; use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeInterface; use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeMargin; use Endroid\QrCode\RoundBlockSizeMode\RoundBlockSizeModeShrink; final class Matrix implements MatrixInterface { /** @var array<int, array<int, int>> */ private $blockValues = []; /** @var float */ private $blockSize; /** @var int */ private $innerSize; /** @var int */ private $outerSize; /** @var int */ private $marginLeft; /** @var int */ private $marginRight; /** @param array<array<int>> $blockValues */ public function __construct(array $blockValues, int $size, int $margin, RoundBlockSizeModeInterface $roundBlockSizeMode) { $this->blockValues = $blockValues; $this->blockSize = $size / $this->getBlockCount(); $this->innerSize = $size; $this->outerSize = $size + 2 * $margin; if ($roundBlockSizeMode instanceof RoundBlockSizeModeEnlarge) { $this->blockSize = intval(ceil($this->blockSize)); $this->innerSize = $this->blockSize * $this->getBlockCount(); $this->outerSize = $this->innerSize + 2 * $margin; } elseif ($roundBlockSizeMode instanceof RoundBlockSizeModeShrink) { $this->blockSize = intval(floor($this->blockSize)); $this->innerSize = $this->blockSize * $this->getBlockCount(); $this->outerSize = $this->innerSize + 2 * $margin; } elseif ($roundBlockSizeMode instanceof RoundBlockSizeModeMargin) { $this->blockSize = intval(floor($this->blockSize)); $this->innerSize = $this->blockSize * $this->getBlockCount(); } $this->marginLeft = intval(($this->outerSize - $this->innerSize) / 2); $this->marginRight = $this->outerSize - $this->innerSize - $this->marginLeft; } public function getBlockValue(int $rowIndex, int $columnIndex): int { return $this->blockValues[$rowIndex][$columnIndex]; } public function getBlockCount(): int { return count($this->blockValues[0]); } public function getBlockSize(): float { return $this->blockSize; } public function getInnerSize(): int { return $this->innerSize; } public function getOuterSize(): int { return $this->outerSize; } public function getMarginLeft(): int { return $this->marginLeft; } public function getMarginRight(): int { return $this->marginRight; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0.01 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�