mirror of
https://git.code.sf.net/p/zint/code
synced 2026-01-25 21:05:58 +00:00
Integrate GS1 Syntax Engine
This commit is contained in:
@@ -199,7 +199,7 @@ namespace Zint {
|
||||
m_compliant_height(false),
|
||||
m_rotate_angle(0),
|
||||
m_eci(0),
|
||||
m_gs1parens(false), m_gs1nocheck(false),
|
||||
m_gs1parens(false), m_gs1nocheck(false), m_gs1syntaxengine(false),
|
||||
m_reader_init(false),
|
||||
m_guard_whitespace(false),
|
||||
m_embed_vector_font(false),
|
||||
@@ -278,6 +278,9 @@ namespace Zint {
|
||||
if (m_gs1nocheck) {
|
||||
m_zintSymbol->input_mode |= GS1NOCHECK_MODE;
|
||||
}
|
||||
if (m_gs1syntaxengine) {
|
||||
m_zintSymbol->input_mode |= GS1SYNTAXENGINE_MODE;
|
||||
}
|
||||
m_zintSymbol->eci = m_eci;
|
||||
m_zintSymbol->dpmm = m_dpmm;
|
||||
m_zintSymbol->dot_size = m_dot_size;
|
||||
@@ -738,6 +741,15 @@ namespace Zint {
|
||||
m_gs1nocheck = gs1NoCheck;
|
||||
}
|
||||
|
||||
/* Use GS1 Syntax Engine to validate GS1 data */
|
||||
bool QZint::gs1SyntaxEngine() const {
|
||||
return m_gs1syntaxengine;
|
||||
}
|
||||
|
||||
void QZint::setGS1SyntaxEngine(bool gs1SyntaxEngine) {
|
||||
m_gs1syntaxengine = gs1SyntaxEngine;
|
||||
}
|
||||
|
||||
/* Reader Initialisation (Programming) */
|
||||
bool QZint::readerInit() const {
|
||||
return m_reader_init;
|
||||
@@ -1233,6 +1245,11 @@ namespace Zint {
|
||||
return ZBarcode_NoPng() == 1;
|
||||
}
|
||||
|
||||
/* Whether Zint library "libzint" built with PNG support or not */
|
||||
bool QZint::haveGS1SyntaxEngine() {
|
||||
return ZBarcode_HaveGS1SyntaxEngine() == 1;
|
||||
}
|
||||
|
||||
/* Version of Zint library "libzint" linked to */
|
||||
int QZint::getVersion() {
|
||||
return ZBarcode_Version();
|
||||
|
||||
@@ -208,6 +208,10 @@ public:
|
||||
bool gs1NoCheck() const; // `symbol->input_mode | GS1NOCHECK_MODE`
|
||||
void setGS1NoCheck(bool gs1NoCheck);
|
||||
|
||||
/* Use GS1 Syntax Engine to validate GS1 data */
|
||||
bool gs1SyntaxEngine() const; // `symbol->input_mode | GS1SYNTAXENGINE_MODE`
|
||||
void setGS1SyntaxEngine(bool gs1SyntaxEngine);
|
||||
|
||||
/* Reader Initialisation (Programming) */
|
||||
bool readerInit() const; // `symbol->output_options | READER_INIT`
|
||||
void setReaderInit(bool readerInit);
|
||||
@@ -317,6 +321,9 @@ public:
|
||||
/* Whether Zint library "libzint" built with PNG support or not */
|
||||
static bool noPng(); // `ZBarcode_NoPng()`
|
||||
|
||||
/* Whether Zint library "libzint" built with GS1 Syntax Engine support or not */
|
||||
static bool haveGS1SyntaxEngine(); // `ZBarcode_HaveGS1SyntaxEngine()`
|
||||
|
||||
/* Version of Zint library "libzint" linked to */
|
||||
static int getVersion(); // `ZBarcode_Version()`
|
||||
|
||||
@@ -391,6 +398,7 @@ private:
|
||||
int m_eci;
|
||||
bool m_gs1parens;
|
||||
bool m_gs1nocheck;
|
||||
bool m_gs1syntaxengine;
|
||||
bool m_reader_init;
|
||||
bool m_guard_whitespace;
|
||||
bool m_embed_vector_font;
|
||||
|
||||
Reference in New Issue
Block a user