Std.Qr
Std.Qr — QR Code encoding (ISO/IEC 18004), pure.
Types
type QrCode
type ErrorCorrection = Low | Medium | Quartile | High
Values
encode : ErrorCorrection -> String -> Result Error QrCode
`encode level text` — the QR code for `text`. `Err` when the text is too
isDark : Int -> Int -> QrCode -> Bool
`isDark column row code` — is this module dark? `False` outside the
rows : QrCode -> List (List Bool)
The matrix, top row first, `True` for a dark module.
size : QrCode -> Int
Modules per side: 21 for version 1, up to 177 for version 40.
toSvg : Int -> QrCode -> String
`toSvg modulePixels code` — a standalone SVG document: black modules on
toTerminal : QrCode -> String
The code as terminal text: two module rows per line with the upper-half
view : Int -> QrCode -> Element msg
`view modulePixels code` — the code as an `Std.Ui` element (inline SVG),