CreateQRCode (open)

Create a QR code

Syntax

LOADLIB "wh::graphics/qrcode.whlib";

OBJECT FUNCTION CreateQRCode(STRING intext, RECORD options)

Parameters

STRING intext

The text to encode

RECORD options
INTEGER colordark

Draw color, defaults to black

INTEGER colorlight

Background color, defaults to white

STRING correctlevel

Error correction level, one of "L", "M", "Q" or "H", defaults to "H" (=highest)

BLOB logo

A logo to add to the QR code. Adding a logo may require you to tune the QR code size or error correction

INTEGER logosize

Override the logo size if the QR code doesn't work with the automatically determined logo size (the size is in modules (blocks), the logo is rendered with a padding of 1 module on each side within this size)

INTEGER margin

QR code margin, defaults to 4 modules

INTEGER size

Max output size, defaults to 256 (=256x256 pixels)

Return value

OBJECT

A drawlib canvas object containing the QR code. The caller will need to close it