Interface QRCanvasOptions

Hierarchy

  • QRCanvasOptions

Properties

background?: QRCanvasLayerValue

The background color or image of the QRCode. Default as 'white'.

canvas?: HTMLCanvasElement

The final image will be painted to canvas if provided.

cellSize?: number

The pixel width or height of a cell. Default value is used only if neither cellSize nor size is provided. Default as 2.

correctLevel?: ErrorCorrectionLevel

The correct level of QRCode. When logo is assigned, correctLevel will be set to H.

data?: string

The data to be encoded in the QRCode, text will be encoded in UTF-8. Default as ''.

foreground?: QRCanvasLayerValue

The foreground color or image of the QRCode. Default as 'black'.

Add a logo in the middle of the QRCode.

padding?: number

Padding space around the QRCode. Default as 0.

resize?: boolean

Whether to resize the canvas to size of QRCode on render

size?: number

The pixel width or height of the entire image, ignored if cellSize is specified. Default as undefined.

typeNumber?: TypeNumber

The type number of the QRCode. If too small to contain the data, the smallest valid type number will be used instead. Default as 0.

Generated using TypeDoc