render

fun render(cellSize: Int = DEFAULT_CELL_SIZE, brightColor: Int = Colors.WHITE, darkColor: Int = Colors.BLACK): QRCodeGraphics(source)

Renders a QR Code image based on its computed data. This function exists to ease the interop with Java :)

Return

A QRCodeGraphics with the QR Code rendered on it. It can then be saved or manipulated as desired.

Parameters

cellSize

The size in pixels of each square (cell) in the QR Code. Defaults to 25.

brightColor

Color to be used for the "bright" parts of the QR Code. In RGBA space. Defaults to white.

darkColor

Color to be used for the "dark" parts of the QR Code. In RGBA space. Defaults to black.

See also


fun render(cellSize: Int = DEFAULT_CELL_SIZE, rawData: QRCodeRawData = encode(), qrCodeGraphics: QRCodeGraphics = graphicsFactory.newGraphicsSquare(computeImageSize(cellSize, rawData)), brightColor: Int = Colors.WHITE, darkColor: Int = Colors.BLACK): QRCodeGraphics(source)

Renders a QR Code image based on its computed data.

Return

A QRCodeGraphics with the QR Code rendered on it. It can then be saved or manipulated as desired.

Parameters

cellSize

The size in pixels of each square (cell) in the QR Code. Defaults to 25.

rawData

The data matrix of the QR Code. Defaults to this.encode().

qrCodeGraphics

The QRCodeGraphics where the QRCode will be painted into.

brightColor

Color to be used for the "bright" parts of the QR Code. In RGBA space. Defaults to white.

darkColor

Color to be used for the "dark" parts of the QR Code. In RGBA space. Defaults to black.

See also