Function: qrCodeMatrixToPath()
function qrCodeMatrixToPath(matrix: QrCodeMatrix): string;Defined in: shared/qr-code/svg.ts:26
Serialize a matrix to an SVG path d attribute, in module units — one
module is one user-space unit, origin at the top-left of the quiet zone.
Horizontally adjacent dark modules are merged into a single sub-path. That
keeps the output roughly an order of magnitude smaller than one <rect>
per module, and — more importantly for print — removes the hairline seams
that renderers leave between abutting rectangles, which can break decoding
at low DPI.
Exposed on its own so callers embedding a QR code into an SVG they already own (a report template, a badge layout) can place the geometry themselves.
Parameters
| Parameter | Type |
|---|---|
matrix | QrCodeMatrix |
Returns
string