BitMatrix
Represents a 2D matrix of bits. In function arguments below, and throughout the common module, x is the column position, and y is the row position. The ordering is always x, y. The origin is at the top-left.
Internally the bits are represented in a 1-D array of 32-bit ints. However, each row begins with a new int. This is done intentionally so that we can copy out a row into a BitArray very efficiently.
The ordering of bits is row-major. Within each int, the least significant bits are used first, meaning they represent lower x values. This is compatible with BitArray's implementation.
Constructors
Functions
This is useful in detecting the enclosing rectangle of a 'pure' barcode.
This is useful in detecting a corner of a 'pure' barcode.
Renders a BitMatrix to a standalone SVG string: true vector output, no rasteriser, no platform. Each dark module becomes a 1×1 path cell, so the whole symbol is a single <path>.