DataMatrixOptions Class

Options for the creation of Data Matrix symbols by Barcode2D.CreateDataMatrix.

public sealed class DataMatrixOptions

Remarks

An ECC 200 symbol is square, from 10 × 10 to 144 × 144 modules, or rectangular: 8 × 18, 8 × 32, 12 × 26, 12 × 36, 16 × 36 or 16 × 48 modules (height × width). Among the sizes that satisfy these options and hold the data, the symbol has the one with the fewest modules. Set DataMatrixOptions.Height and DataMatrixOptions.Width to get a symbol of that exact size: data shorter than its capacity is padded.

The sizes are numbers of modules, not the size of the image: the ModuleSize of the renderers sets how many pixels or units a module takes.

Constructors

NameDescription
DataMatrixOptions()

DataMatrixOptions()

public DataMatrixOptions()

No documentation is available.

Properties

NameDescription
HeightGets or sets the exact height of the symbol in modules, or null for any height.
ShapeGets or sets the shapes the symbol can have. The default is DataMatrixShape.Square.
WidthGets or sets the exact width of the symbol in modules, or null for any width.

Gets or sets the exact height of the symbol in modules, or null for any height.

public int? Height { get; set; }

Property value

int?

Exceptions

ArgumentOutOfRangeException
The value is not the height of a Data Matrix size.

Gets or sets the shapes the symbol can have. The default is DataMatrixShape.Square.

public DataMatrixShape Shape { get; set; }

Property value

DataMatrixShape

Exceptions

ArgumentOutOfRangeException
The value is not a defined DataMatrixShape value.

Remarks

The shape is ignored when DataMatrixOptions.Height or DataMatrixOptions.Width is set.

Gets or sets the exact width of the symbol in modules, or null for any width.

public int? Width { get; set; }

Property value

int?

Exceptions

ArgumentOutOfRangeException
The value is not the width of a Data Matrix size.