Add GS1PARENS_MODE (input_mode) to allow inputting GS1 AIs in parentheses

This commit is contained in:
gitlost 2021-05-15 12:23:46 +01:00
parent 6fb0d077bc
commit 79d3c1dc7a
38 changed files with 672 additions and 359 deletions

View file

@ -53,6 +53,7 @@ namespace Zint {
target_size_vert = 0;
m_option_2 = 0;
m_whitespace = 0;
m_gs1parens = false;
m_gssep = false;
m_reader_init = false;
m_rotate_angle = 0;
@ -86,6 +87,9 @@ namespace Zint {
m_zintSymbol->eci = m_eci;
m_zintSymbol->option_3 = m_option_3;
m_zintSymbol->scale = m_scale;
if (m_gs1parens) {
m_zintSymbol->input_mode |= GS1PARENS_MODE;
}
if (m_gssep) {
m_zintSymbol->output_options |= GS1_GS_SEPARATOR;
}
@ -312,6 +316,10 @@ namespace Zint {
}
}
void QZint::setGS1Parens(bool gs1parens) {
m_gs1parens = gs1parens;
}
void QZint::setReaderInit(bool reader_init) {
m_reader_init = reader_init;
}
@ -332,6 +340,10 @@ namespace Zint {
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_ECI);
}
bool QZint::supportsGS1(int symbology) const {
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_GS1);
}
bool QZint::isFixedRatio(int symbology) const {
return ZBarcode_Cap(symbology ? symbology : m_symbol, ZINT_CAP_FIXED_RATIO);
}