Qrc.MatrixSourceQR 2D matrices.
The type for sequence of bits.
The type for 2D square matrices of modules (binary pixels).
For a matrix of width w, the module at position (0,0) is the top-left corner, and (w-1,w-1) is the bottom-right corner. The quiet zone (surrounding frame of four zero modules) is not included. We store the bits in row-major order.
of_bits ~w bits is a matrix from the sequence of bits bits interpreted in row-major order. Exceeding final bits are ignored.
bits m are the matrix's bits (modules) in row-major order. If there are more bits than (w m) * (w m), exceeding final bits should be ignored.
fold f m acc folds f over all the modules (x,y) of m as f x y (get m ~x ~y) acc' in row-major order and starting with acc.
to_svg ~w_mm ~invert ~quiet_zone m is an SVG image for m in a coordinate system using one (slightly larger) unit black square per set module. The image, including the quiet zone, has a width and height of w_mm millimeters (defaults to 50). If invert is true (defaults to false) black modules are white and vice-versa. If quiet_zone is true (default) the surrounding frame of four zero modules is included.