vendor/bacon/bacon-qr-code/src/BaconQrCode/Encoder/MatrixUtil.php

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
/**
 * BaconQrCode
 *
 * @link      http://github.com/Bacon/BaconQrCode For the canonical source repository
 * @copyright 2013 Ben 'DASPRiD' Scholzen
 * @license   http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
 */

namespace BaconQrCode\Encoder;

use BaconQrCode\Common\BitArray;
use BaconQrCode\Common\ErrorCorrectionLevel;
use BaconQrCode\Common\Version;
use BaconQrCode\Exception;

/**
 * Matrix utility.
 */
class MatrixUtil
{
    /**
     * Position detection pattern.
     *
     * @var array
     */
    protected static $positionDetectionPattern = array(
        array(1, 1, 1, 1, 1, 1, 1),
        array(1, 0, 0, 0, 0, 0, 1),
        array(1, 0, 1, 1, 1, 0, 1),
        array(1, 0, 1, 1, 1, 0, 1),
        array(1, 0, 1, 1, 1, 0, 1),
        array(1, 0, 0, 0, 0, 0, 1),
        array(1, 1, 1, 1, 1, 1, 1),
    );

    /**
     * Position adjustment pattern.
     *
     * @var array
     */
    protected static $positionAdjustmentPattern = array(
        array(1, 1, 1, 1, 1),
        array(1, 0, 0, 0, 1),
        array(1, 0, 1, 0, 1),
        array(1, 0, 0, 0, 1),
        array(1, 1, 1, 1, 1),
    );

    /**
     * Coordinates for position adjustment patterns for each version.
     *
     * @var array
     */
    protected static $positionAdjustmentPatternCoordinateTable = array(
        array(null, null, null, null, null, null, null), // Version 1
        array(   6,   18, null, null, null, null, null), // Version 2
        array(   6,   22, null, null, null, null, null), // Version 3
        array(   6,   26, null, null, null, null, null), // Version 4
        array(   6,   30, null, null, null, null, null), // Version 5

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。