vendor/bacon/bacon-qr-code/src/BaconQrCode/Common/BitMatrix.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\Common;

use SplFixedArray;

/**
 * Bit matrix.
 *
 * Represents a 2D matrix of bits. In function arguments below, and throughout
 * the common module, x is the column position, and y is the row position. The
 * ordering is always x, y. The origin is at the top-left.
 */
class BitMatrix
{
    /**
     * Width of the bit matrix.
     *
     * @var integer
     */
    protected $width;

    /**
     * Height of the bit matrix.
     *
     * @var integer
     */
    protected $height;

    /**
     * Size in bits of each individual row.
     *
     * @var integer
     */
    protected $rowSize;

    /**
     * Bits representation.
     *
     * @var SplFixedArray
     */
    protected $bits;

    /**
     * Creates a new bit matrix with given dimensions.
     *
     * @param  integer      $width
     * @param  integer|null $height
     * @throws Exception\InvalidArgumentException
     */
    public function __construct($width, $height = null)
    {
        if ($height === null) {

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

AI 解读 AI

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

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