Houjie
2025-07-24 52a3ff1bce1417b39f6872d8e8cb378e9c2ccc6f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import BitMatrix from '../../common/BitMatrix';
import ErrorCorrectionLevel from './ErrorCorrectionLevel';
import ECBlocks from './ECBlocks';
/**
 * See ISO 18004:2006 Annex D
 *
 * @author Sean Owen
 */
export default class Version {
    private versionNumber;
    private alignmentPatternCenters;
    /**
       * See ISO 18004:2006 Annex D.
       * Element i represents the raw version bits that specify version i + 7
       */
    private static VERSION_DECODE_INFO;
    /**
       * See ISO 18004:2006 6.5.1 Table 9
       */
    private static VERSIONS;
    private ecBlocks;
    private totalCodewords;
    private constructor();
    getVersionNumber(): number;
    getAlignmentPatternCenters(): Int32Array;
    getTotalCodewords(): number;
    getDimensionForVersion(): number;
    getECBlocksForLevel(ecLevel: ErrorCorrectionLevel): ECBlocks;
    /**
     * <p>Deduces version information purely from QR Code dimensions.</p>
     *
     * @param dimension dimension in modules
     * @return Version for a QR Code of that dimension
     * @throws FormatException if dimension is not 1 mod 4
     */
    static getProvisionalVersionForDimension(dimension: number): Version;
    static getVersionForNumber(versionNumber: number): Version;
    static decodeVersionInformation(versionBits: number): Version;
    /**
     * See ISO 18004:2006 Annex E
     */
    buildFunctionPattern(): BitMatrix;
    toString(): string;
}