C
QrCode
testedA 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 QrCodeProperties
| Property | Type | Description |
|---|---|---|
sizereadonly | number | The width and height of this QR Code, measured in modules, between 21 and 177 (inclusive). |
maskreadonly | number | The index of the mask pattern used in this QR Code, which is between 0 and 7 (inclusive). |
Methods
getModuleReturns 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| Parameter | Type | Description |
|---|---|---|
x | number | — |
y | number | — |
Returns
booleangetTypeReturns the data type of the module at the given coordinates.
ts
public getType(x: number, y: number): QrCodeDataType| Parameter | Type | Description |
|---|---|---|
x | number | — |
y | number | — |
Returns
QrCodeDataType