resolveQrCornerRadius
QrCode
stable
Convert a DS-shaped rounded value (named rung, number, boolean, or string) into a per-module corner radius in the [0, 0.5] range expected by the QR encoder. CSS dimension strings fall back to 0.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- valuerequiredTRounded | number | boolean | string | null | undefined
- A DS rounded value: a named rung string ("x-small" … "x-large"), true (0.5 = fully rounded), false/null/undefined (0 = square), a number (clamped to [0, 0.5]), or a CSS dimension string (falls back to 0).
API
Return value
The value returned by this util.
- A corner radius in [0, 0.5] module units. 0 = square modules, 0.5 = fully rounded dots.
Usage
Examples
Ready-to-paste usage snippets.
Resolve various rounded values to module units