DrawQRCode
(Engine-Level Function)
Description: | Draw a QRCode at a given location. |
Returns: | Graphic |
Usage: ![]() |
Steady State only. |
Function Groups: | Graphics |
Related to: | | GenerateQRCode | |
Format: ![]() |
DrawQRCode(QRCode[, XOff, YOff, Size, Color, Space]) |
Parameters: |
QR Code |
QRCode returned from GenerateQRCode (array) |
XOff |
X coordinate. Default = 0 (left) |
YOff |
Y coordinate. Default = 0 (top) |
Size |
Square size in pixels. Default = 6 |
Color |
Dark square color. Default = 0 (black) |
Space |
Space between squares. Default = 0 |
Comments: |
Waits for a valid QRCode returned from GenerateQRCode. Draws a 5x5 grid for the QR code. Squares are drawn 25 at a time to preserve performance. The default color is black. The colored squares are drawn, the white spaces are not drawn, the background color fills in the negative space. |
Examples:
Steady-state example
Main [ Code = System.GenerateQRCode("https://www.vtscada.com/" { Input }, 2 { Error correction level }); System.DrawQRCode(Code, 300, 300, Size, Color, Space); ]
Script example
Init [ If 1 Main; [ Code = System.GenerateQRCode("https://www.vtscada.com/" { Input }, 2 { Error correction level }); ] ] Main [ System.DrawQRCode(Code, 300, 300, Size, Color, Space); ]