View Source QRCode.DataMasking (QRCode v3.1.0)
A mask pattern changes which modules are dark and which are light according to a particular rule. The purpose of this step is to modify the QR code to make it as easy for a QR code reader to scan as possible.
Summary
Functions
@spec apply(QRCode.QR.t()) :: QRCode.QR.t()
@spec best_mask(Enumerable.t()) :: {non_neg_integer(), MatrixReloaded.Matrix.t()}
@spec masking_matrices(MatrixReloaded.Matrix.t()) :: Enumerable.t()
@spec penalty(MatrixReloaded.Matrix.t(), 1 | 2 | 3 | 4) :: non_neg_integer()
@spec total_penalties(Enumerable.t()) :: Enumerable.t()
@spec total_penalty(MatrixReloaded.Matrix.t()) :: pos_integer()