Struct PenaltyScore
- Namespace
- Net.Codecrete.QrCodeGenerator
- Assembly
- QrCodeGenerator.dll
Information about the penalty score of a data mask pattern.
QR code use one out of eight patterns to improve the readability of the code. The penalty score measures how difficult it is to read a QR code with a given pattern.
The penaly score information can be collected for analysis purposes, but it is not used by the library itself. If the information is collected, the QR code generation will be slower as the library needs to fully calculate the penalty score even if it is already clear that the pattern is not the best one.
Note that in deviation from the QR code specification, the penalty score does not include the score contributed by the finder patterns.
public struct PenaltyScore
- Inherited Members
Properties
Blocks
Penalty score for blocks of 2x2 modules of the same color.
public int Blocks { get; set; }
Property Value
ColorBalance
Penalty score for an inbalance of the number of dark and light modules.
public int ColorBalance { get; set; }
Property Value
HorizontalFinderPatterns
Penalty score for patterns that look like the finder patterns (1:1:3:1:1 ratio) in the horizontal direction.
public int HorizontalFinderPatterns { get; set; }
Property Value
HorizontalStreaks
Penalty score for long horizontal runs of the same color.
public int HorizontalStreaks { get; set; }
Property Value
Total
The total penalty score for the data mask pattern.
public int Total { get; set; }
Property Value
VerticalFinderPatterns
Penalty score for patterns that look like the finder patterns (1:1:3:1:1 ratio) in the vertical direction.
public int VerticalFinderPatterns { get; set; }
Property Value
VerticalStreaks
Penalty score for long vertical runs of the same color.
public int VerticalStreaks { get; set; }