Expand description
Core encoding representations.
All symbologies produce an Encoded value that the renderer then turns
into SVG or PNG. The two shapes mirror BWIPP’s split between renlinear
(1D) and renmatrix (2D).
Structs§
- BitMatrix
- A 2D black/white module grid.
(0, 0)is the top-left. - Color
Matrix - A 2D colour matrix:
rows × columnscells where each cell carries a palette index into an 8-entry[Rgb8; 8]colour table. Cells with palette index 0 are treated as background (typically white) by the renderer — no rect / pixel emitted. - DotMatrix
- A sparse 2D dot grid:
rows × columnscells wheretruemeans a dot is present at that position. Only odd-parity positions ((x + y) % 2 == 1) ever carry true cells from a DotCode encoder; the renderer treats all true cells uniformly. - Linear
Pattern - A 1D bar pattern as a run-length encoding.
- Postal4
Pattern - A 4-state postal symbol: an ordered sequence of bars with optional human-readable text.
- Rgb8
- 8-bit-per-channel sRGB colour. Used in
ColorMatrixpalettes and the renderer dispatch. - Stacked
Pattern - A stacked / multi-row 1D barcode. Each row carries its own
LinearPattern; the renderer draws them top-to-bottom with a one- module spacer between rows.