R
C

QrCode

tested

A QR Code symbol, which is a type of two-dimension barcode. Invented by Denso Wave and described in the ISO/IEC 18004 standard. Instances of this class represent an immutable square grid of dark and light cells.

Signature

ts
class QrCode

Properties

PropertyTypeDescription
sizereadonlynumberThe width and height of this QR Code, measured in modules, between 21 and 177 (inclusive).
maskreadonlynumberThe index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive).

Methods

getModule

Returns the color of the module (pixel) at the given coordinates. false for light, true for dark. Out of bounds returns false (light).

ts
public getModule(x: number, y: number): boolean
ParameterTypeDescription
xnumber
ynumber
Returnsboolean
getType

Returns the data type of the module at the given coordinates.

ts
public getType(x: number, y: number): QrCodeDataType
ParameterTypeDescription
xnumber
ynumber
ReturnsQrCodeDataType