1
0
mirror of https://git.code.sf.net/p/zint/code synced 2025-12-18 02:17:06 +00:00

Integrate GS1 Syntax Engine

This commit is contained in:
gitlost
2025-09-12 04:20:55 +01:00
parent ad95d8f2b0
commit 0650d5798e
32 changed files with 2109 additions and 723 deletions

View File

@@ -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();