Table of Contents

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

int

ColorBalance

Penalty score for an inbalance of the number of dark and light modules.

public int ColorBalance { get; set; }

Property Value

int

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

int

HorizontalStreaks

Penalty score for long horizontal runs of the same color.

public int HorizontalStreaks { get; set; }

Property Value

int

Total

The total penalty score for the data mask pattern.

public int Total { get; set; }

Property Value

int

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

int

VerticalStreaks

Penalty score for long vertical runs of the same color.

public int VerticalStreaks { get; set; }

Property Value

int