BPS C++ API  2.24.4
BpsDataMatrix Class Reference

Encoder for Data Matrix bar code. More...

#include <bpsdatamatrix.h>

Public Types

enum  Mode { ModeRegular = 0 , ModeGS1 = 1 , ModeReader = 2 }
 Mode. More...
 
enum  Shape { ShapeAny = 0 , ShapeSquare = 1 , ShapeRect = 2 }
 Code shapes. More...
 

Public Member Functions

 BpsDataMatrix ()
 Default constructor.
 
QVector< QVector< bool > > encode (const QString &aText, Shape aShape, Mode aMode)
 Encode a text into a matrix. More...
 

Detailed Description

Encoder for Data Matrix bar code.

Encoding happens according to ISO/IEC 16022 bar code symbology specifications for Data Matrix. Only ECC 200 type is supported which uses Reed-Solomon error correction. GS1 QR Code is supported where a FNC1 mode is added as first data element. ASCII GS (hex 1D) may be used as terminator for variable application data fields.

Member Enumeration Documentation

◆ Mode

Mode.

Enumerator
ModeRegular 

Regular mode.

ModeGS1 

GS1 mode.

ModeReader 

Reader programming mode.

◆ Shape

Code shapes.

Enumerator
ShapeAny 

Use either square or rectangular shapes.

ShapeSquare 

Use only square shapes.

ShapeRect 

Use only rectangular shapes.

Member Function Documentation

◆ encode()

QVector<QVector<bool> > BpsDataMatrix::encode ( const QString aText,
Shape  aShape,
Mode  aMode 
)

Encode a text into a matrix.

Parameters
aTextThe text to encode. In case the text is too large for the given shapes, a empty matrix is returned.
aShapeThe shapes to use.
aModeThe mode to use.
Returns
The encoded text in a bit matrix (2 dimensional array).

The documentation for this class was generated from the following file: