CreateQRCode (open)
Create a QR code
Syntax
LOADLIB "wh::graphics/qrcode.whlib";
OBJECT FUNCTION CreateQRCode(STRING intext, RECORD options)Parameters
STRING intextThe text to encode
RECORD optionsINTEGER colordarkDraw color, defaults to black
INTEGER colorlightBackground color, defaults to white
STRING correctlevelError correction level, one of "L", "M", "Q" or "H", defaults to "H" (=highest)
BLOB logoA logo to add to the QR code. Adding a logo may require you to tune the QR code size or error correction
INTEGER logosizeOverride 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 marginQR code margin, defaults to 4 modules
INTEGER sizeMax output size, defaults to 256 (=256x256 pixels)
Return value
OBJECTA drawlib canvas object containing the QR code. The caller will need to close it