Table of Contents

Class QrMatrix

Namespace
TwBlazor.Services.Encoding
Assembly
TwBlazor.dll

An encoded QR code: a square grid of dark and light modules, ready to be drawn by any renderer.

public sealed class QrMatrix : IEncodedSymbol
Inheritance
QrMatrix
Implements
Inherited Members
Extension Methods

Remarks

The matrix is immutable, so it can be cached and shared freely. Coordinates start at the top-left, with x running right and y running down. It does not include the quiet zone; a renderer adds that margin itself. Draw it with the SymbolSvg methods.

Properties

ErrorCorrection

Gets the error correction level the code was encoded with. This can be higher than the level asked for when BoostErrorCorrection is on.

public QrErrorCorrection ErrorCorrection { get; }

Property Value

QrErrorCorrection

Height

Gets the number of module rows; 1 for a one-dimensional barcode, whose bars are stretched to any height.

public int Height { get; }

Property Value

int

this[int, int]

Gets whether the module at a position is dark.

public bool this[int x, int y] { get; }

Parameters

x int

The column, from 0 at the left.

y int

The row, from 0 at the top.

Property Value

bool

true for a dark module; false for a light one or a position outside the grid.

Mask

Gets the mask pattern applied, from 0 to 7.

public int Mask { get; }

Property Value

int

QuietZone

Gets the light margin the standard asks for around a QR code: 4 modules.

public int QuietZone { get; }

Property Value

int

Size

Gets the width and height of the grid, in modules.

public int Size { get; }

Property Value

int

Version

Gets the version, from 1 (21x21 modules) to 40 (177x177 modules).

public int Version { get; }

Property Value

int

Width

Gets the number of module columns.

public int Width { get; }

Property Value

int

Methods

IsFinderPattern(int, int)

Gets whether a position lies in one of the three finder patterns (the large squares in the corners), including the light separator around each. Renderers can use this to draw the corners in their own style.

public bool IsFinderPattern(int x, int y)

Parameters

x int

The column, from 0 at the left.

y int

The row, from 0 at the top.

Returns

bool

true when the position belongs to a finder pattern.