mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-09 13:41:59 -04:00
- zint_symbol->fgcolour
& bgcolour
buffer lengths extended 10
-> 16 to allow for "C,M,Y,K" comma-separated decimal percentage strings - API/CLI/GUI: allow foreground/background colours to be specified as comma-separated decimal "C,M,Y,K" strings where "C", "M" etc. are percentages (0-100) (ticket #281, 3rd point) - output.c: new funcs `out_colour_get_rgb()` & `out_colour_get_cmyk()` and use in bmp/emf/gif etc. - PCX: add alpha support - GUI: fix fg/gbcolor icon background not being reset on zap - GUI: Rearrange some Appearance tab inputs (Border Type <-> Width, Show Text <-> Font, Text/Font <-> Printing Scale/Size) to flow more naturally (hopefully) - GUI: save button "Save As..." -> "Save..." and add icon - CLI: add --bgcolor/colour & --fgcolor/colour synonyms
This commit is contained in:
parent
48eaa0cc4e
commit
ab2abccdb6
55 changed files with 1439 additions and 886 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <QFontMetrics>
|
||||
/* The following include is necessary to compile with Qt 5.15 on Windows; Qt 5.7 did not require it */
|
||||
#include <QPainterPath>
|
||||
#include <QRegularExpression>
|
||||
|
||||
// Shorthand
|
||||
#define QSL QStringLiteral
|
||||
|
@ -41,6 +42,41 @@ namespace Zint {
|
|||
static const int maxSegs = 256;
|
||||
static const int maxCLISegs = 10; /* CLI restricted to 10 segments (including main data) */
|
||||
|
||||
static const QRegularExpression colorRE(
|
||||
QSL("^([0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?)|(((100|[0-9]{0,2}),){3}(100|[0-9]{0,2}))$"));
|
||||
|
||||
static QString qcolor_to_str(const QColor &color) {
|
||||
if (color.alpha() == 0xFF) {
|
||||
return QString::asprintf("%02X%02X%02X", color.red(), color.green(), color.blue());
|
||||
}
|
||||
return QString::asprintf("%02X%02X%02X%02X", color.red(), color.green(), color.blue(), color.alpha());
|
||||
}
|
||||
|
||||
static QColor str_to_qcolor(const QString &text) {
|
||||
QColor color;
|
||||
int r, g, b, a;
|
||||
if (text.contains(',')) {
|
||||
int comma1 = text.indexOf(',');
|
||||
int comma2 = text.indexOf(',', comma1 + 1);
|
||||
int comma3 = text.indexOf(',', comma2 + 1);
|
||||
int black = 100 - text.mid(comma3 + 1).toInt();
|
||||
int val = 100 - text.mid(0, comma1).toInt();
|
||||
r = (int) roundf((0xFF * val * black) / 10000.0f);
|
||||
val = 100 - text.mid(comma1 + 1, comma2 - comma1 - 1).toInt();
|
||||
g = (int) roundf((0xFF * val * black) / 10000.0f);
|
||||
val = 100 - text.mid(comma2 + 1, comma3 - comma2 - 1).toInt();
|
||||
b = (int) roundf((0xFF * val * black) / 10000.0f);
|
||||
a = 0xFF;
|
||||
} else {
|
||||
r = text.mid(0, 2).toInt(nullptr, 16);
|
||||
g = text.mid(2, 2).toInt(nullptr, 16);
|
||||
b = text.mid(4, 2).toInt(nullptr, 16);
|
||||
a = text.length() == 8 ? text.mid(6, 2).toInt(nullptr, 16) : 0xFF;
|
||||
}
|
||||
color.setRgb(r, g, b, a);
|
||||
return color;
|
||||
}
|
||||
|
||||
/* Helper to convert ECI combo index to ECI value */
|
||||
static int ECIIndexToECI(const int ECIIndex) {
|
||||
int ret;
|
||||
|
@ -109,7 +145,7 @@ namespace Zint {
|
|||
m_scale(1.0f),
|
||||
m_dotty(false), m_dot_size(4.0f / 5.0f),
|
||||
m_guardDescent(5.0f),
|
||||
m_fgColor(Qt::black), m_bgColor(Qt::white), m_cmyk(false),
|
||||
m_fgStr(QSL("000000")), m_bgStr(QSL("FFFFFF")), m_cmyk(false),
|
||||
m_borderType(0), m_borderWidth(0),
|
||||
m_whitespace(0), m_vwhitespace(0),
|
||||
m_fontSetting(0),
|
||||
|
@ -175,14 +211,8 @@ namespace Zint {
|
|||
if (m_reader_init) {
|
||||
m_zintSymbol->output_options |= READER_INIT;
|
||||
}
|
||||
strcpy(m_zintSymbol->fgcolour, m_fgColor.name().toLatin1().right(6));
|
||||
if (m_fgColor.alpha() != 0xFF) {
|
||||
strcat(m_zintSymbol->fgcolour, m_fgColor.name(QColor::HexArgb).toLatin1().mid(1,2));
|
||||
}
|
||||
strcpy(m_zintSymbol->bgcolour, m_bgColor.name().toLatin1().right(6));
|
||||
if (m_bgColor.alpha() != 0xFF) {
|
||||
strcat(m_zintSymbol->bgcolour, m_bgColor.name(QColor::HexArgb).toLatin1().mid(1,2));
|
||||
}
|
||||
strcpy(m_zintSymbol->fgcolour, m_fgStr.toLatin1().left(15));
|
||||
strcpy(m_zintSymbol->bgcolour, m_bgStr.toLatin1().left(15));
|
||||
strcpy(m_zintSymbol->primary, m_primaryMessage.toLatin1().left(127));
|
||||
m_zintSymbol->option_1 = m_option_1;
|
||||
m_zintSymbol->option_2 = m_option_2;
|
||||
|
@ -412,22 +442,48 @@ namespace Zint {
|
|||
memset(&m_structapp, 0, sizeof(m_structapp));
|
||||
}
|
||||
|
||||
/* Foreground colour */
|
||||
/* Foreground colour (may be RGB(A) hex string or CMYK decimal "C,M,Y,K" percentage string) */
|
||||
QString QZint::fgStr() const {
|
||||
return m_fgStr;
|
||||
}
|
||||
|
||||
bool QZint::setFgStr(const QString& fgStr) {
|
||||
if (fgStr.indexOf(colorRE) == 0) {
|
||||
m_fgStr = fgStr;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Foreground colour as QColor */
|
||||
QColor QZint::fgColor() const {
|
||||
return m_fgColor;
|
||||
return str_to_qcolor(m_fgStr);
|
||||
}
|
||||
|
||||
void QZint::setFgColor(const QColor& fgColor) {
|
||||
m_fgColor = fgColor;
|
||||
m_fgStr = qcolor_to_str(fgColor);
|
||||
}
|
||||
|
||||
/* Background colour */
|
||||
/* Background colour (may be RGB(A) hex string or CMYK decimal "C,M,Y,K" percentage string) */
|
||||
QString QZint::bgStr() const {
|
||||
return m_bgStr;
|
||||
}
|
||||
|
||||
bool QZint::setBgStr(const QString& bgStr) {
|
||||
if (bgStr.indexOf(colorRE) == 0) {
|
||||
m_bgStr = bgStr;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Background colour as QColor */
|
||||
QColor QZint::bgColor() const {
|
||||
return m_bgColor;
|
||||
return str_to_qcolor(m_bgStr);
|
||||
}
|
||||
|
||||
void QZint::setBgColor(const QColor& bgColor) {
|
||||
m_bgColor = bgColor;
|
||||
m_bgStr = qcolor_to_str(bgColor);
|
||||
}
|
||||
|
||||
/* Use CMYK colour space (Encapsulated PostScript and TIF) */
|
||||
|
@ -848,6 +904,8 @@ namespace Zint {
|
|||
struct zint_vector_hexagon *hex;
|
||||
struct zint_vector_circle *circle;
|
||||
struct zint_vector_string *string;
|
||||
QColor fgColor = str_to_qcolor(m_fgStr);
|
||||
QColor bgColor = str_to_qcolor(m_bgStr);
|
||||
|
||||
encode();
|
||||
|
||||
|
@ -897,8 +955,10 @@ namespace Zint {
|
|||
painter.translate(xtr, ytr);
|
||||
painter.scale(scale, scale);
|
||||
|
||||
QBrush bgBrush(m_bgColor);
|
||||
painter.fillRect(QRectF(0, 0, gwidth, gheight), bgBrush);
|
||||
QBrush bgBrush(bgColor);
|
||||
if (bgColor.alpha() != 0) {
|
||||
painter.fillRect(QRectF(0, 0, gwidth, gheight), bgBrush);
|
||||
}
|
||||
|
||||
// Plot rectangles
|
||||
rect = m_zintSymbol->vector->rectangles;
|
||||
|
@ -908,7 +968,7 @@ namespace Zint {
|
|||
QBrush brush(Qt::SolidPattern);
|
||||
while (rect) {
|
||||
if (rect->colour == -1) {
|
||||
brush.setColor(m_fgColor);
|
||||
brush.setColor(fgColor);
|
||||
} else {
|
||||
brush.setColor(colourToQtColor(rect->colour));
|
||||
}
|
||||
|
@ -924,7 +984,7 @@ namespace Zint {
|
|||
hex = m_zintSymbol->vector->hexagons;
|
||||
if (hex) {
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QBrush fgBrush(m_fgColor);
|
||||
QBrush fgBrush(fgColor);
|
||||
qreal previous_diameter = 0.0, radius = 0.0, half_radius = 0.0, half_sqrt3_radius = 0.0;
|
||||
while (hex) {
|
||||
if (previous_diameter != hex->diameter) {
|
||||
|
@ -953,20 +1013,20 @@ namespace Zint {
|
|||
if (circle) {
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QPen p;
|
||||
QBrush fgBrush(m_fgColor);
|
||||
QBrush fgBrush(fgColor);
|
||||
qreal previous_diameter = 0.0, radius = 0.0;
|
||||
while (circle) {
|
||||
if (previous_diameter != circle->diameter) {
|
||||
previous_diameter = circle->diameter;
|
||||
radius = 0.5 * previous_diameter;
|
||||
}
|
||||
if (circle->colour) { // Set means use background colour
|
||||
p.setColor(m_bgColor);
|
||||
if (circle->colour) { // Set means use background colour (legacy, no longer used)
|
||||
p.setColor(bgColor);
|
||||
p.setWidthF(circle->width);
|
||||
painter.setPen(p);
|
||||
painter.setBrush(circle->width ? Qt::NoBrush : bgBrush);
|
||||
} else {
|
||||
p.setColor(m_fgColor);
|
||||
p.setColor(fgColor);
|
||||
p.setWidthF(circle->width);
|
||||
painter.setPen(p);
|
||||
painter.setBrush(circle->width ? Qt::NoBrush : fgBrush);
|
||||
|
@ -981,7 +1041,7 @@ namespace Zint {
|
|||
if (string) {
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
QPen p;
|
||||
p.setColor(m_fgColor);
|
||||
p.setColor(fgColor);
|
||||
painter.setPen(p);
|
||||
bool bold = (m_zintSymbol->output_options & BOLD_TEXT)
|
||||
&& (!isExtendable() || (m_zintSymbol->output_options & SMALL_TEXT));
|
||||
|
@ -1080,6 +1140,7 @@ namespace Zint {
|
|||
const bool autoHeight, const float heightPerRow, const QString& outfile,
|
||||
const QZintXdimDpVars *xdimdpVars) const {
|
||||
QString cmd(win && !noEXE ? QSL("zint.exe") : QSL("zint"));
|
||||
bool nobackground = bgColor().alpha() == 0;
|
||||
|
||||
char name_buf[32];
|
||||
if (barcodeNames && ZBarcode_BarcodeName(m_symbol, name_buf) == 0) {
|
||||
|
@ -1093,8 +1154,8 @@ namespace Zint {
|
|||
arg_int(cmd, "--addongap=", option2());
|
||||
}
|
||||
|
||||
if (bgColor() != Qt::white && bgColor() != QColor(0xFF, 0xFF, 0xFF, 0)) {
|
||||
arg_color(cmd, "--bg=", bgColor());
|
||||
if (bgStr() != QSL("FFFFFF") && !nobackground) {
|
||||
arg_str(cmd, "--bg=", bgStr());
|
||||
}
|
||||
|
||||
bool default_bind = false, default_bind_top = false, default_box = false, default_border = false;
|
||||
|
@ -1166,8 +1227,8 @@ namespace Zint {
|
|||
arg_bool(cmd, "--extraesc", inputMode() & EXTRA_ESCAPE_MODE);
|
||||
arg_bool(cmd, "--fast", inputMode() & FAST_MODE);
|
||||
|
||||
if (fgColor() != Qt::black) {
|
||||
arg_color(cmd, "--fg=", fgColor());
|
||||
if (fgStr() != QSL("000000") && fgStr() != QSL("000000FF")) {
|
||||
arg_str(cmd, "--fg=", fgStr());
|
||||
}
|
||||
|
||||
arg_bool(cmd, "--fullmultibyte", supportsFullMultibyte() && (option3() & 0xFF) == ZINT_FULL_MULTIBYTE);
|
||||
|
@ -1202,7 +1263,7 @@ namespace Zint {
|
|||
arg_int(cmd, "--mode=", option1());
|
||||
}
|
||||
|
||||
arg_bool(cmd, "--nobackground", bgColor() == QColor(0xFF, 0xFF, 0xFF, 0));
|
||||
arg_bool(cmd, "--nobackground", nobackground);
|
||||
arg_bool(cmd, "--noquietzones", hasDefaultQuietZones() && noQuietZones());
|
||||
arg_bool(cmd, "--notext", hasHRT() && !showText());
|
||||
arg_data(cmd, longOptOnly ? "--output=" : "-o ", outfile, win);
|
||||
|
@ -1300,14 +1361,6 @@ namespace Zint {
|
|||
}
|
||||
}
|
||||
|
||||
void QZint::arg_color(QString& cmd, const char *const opt, const QColor val) {
|
||||
if (val.alpha() != 0xFF) {
|
||||
cmd += QString::asprintf(" %s%02X%02X%02X%02X", opt, val.red(), val.green(), val.blue(), val.alpha());
|
||||
} else {
|
||||
cmd += QString::asprintf(" %s%02X%02X%02X", opt, val.red(), val.green(), val.blue());
|
||||
}
|
||||
}
|
||||
|
||||
void QZint::arg_data(QString& cmd, const char *const opt, const QString& val, const bool win) {
|
||||
if (!val.isEmpty()) {
|
||||
QString text(val);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2008 by BogDan Vatra *
|
||||
* bogdan@licentia.eu *
|
||||
* Copyright (C) 2010-2022 Robin Stuart *
|
||||
* Copyright (C) 2010-2023 Robin Stuart *
|
||||
* *
|
||||
* This program is free software: you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
|
@ -124,11 +124,19 @@ public:
|
|||
void setStructApp(const int count, const int index, const QString& id);
|
||||
void clearStructApp();
|
||||
|
||||
/* Foreground colour */
|
||||
/* Foreground colour (may be RGB(A) hex string or CMYK decimal "C,M,Y,K" percentage string) */
|
||||
QString fgStr() const; // `symbol->fgcolour`
|
||||
bool setFgStr(const QString& fgStr); // Returns false if not valid colour string
|
||||
|
||||
/* Foreground colour as QColor */
|
||||
QColor fgColor() const; // `symbol->fgcolour`
|
||||
void setFgColor(const QColor& fgColor);
|
||||
|
||||
/* Background colour */
|
||||
/* Background colour (may be RGB(A) hex string or CMYK decimal "C,M,Y,K" percentage string) */
|
||||
QString bgStr() const; // `symbol->bgcolour`
|
||||
bool setBgStr(const QString& bgStr); // Returns false if not valid colour string
|
||||
|
||||
/* Background colour as QColor */
|
||||
QColor bgColor() const; // `symbol->bgcolour`
|
||||
void setBgColor(const QColor& bgColor);
|
||||
|
||||
|
@ -322,7 +330,6 @@ private:
|
|||
static void arg_str(QString& cmd, const char *const opt, const QString& val);
|
||||
static void arg_int(QString& cmd, const char *const opt, const int val, const bool allowZero = false);
|
||||
static void arg_bool(QString& cmd, const char *const opt, const bool val);
|
||||
static void arg_color(QString& cmd, const char *const opt, const QColor val);
|
||||
static void arg_data(QString& cmd, const char *const opt, const QString& val, const bool win);
|
||||
static void arg_seg(QString& cmd, const int seg_no, const QZintSeg& val, const bool win);
|
||||
static void arg_data_esc(QString& cmd, const char *const opt, QString& text, const bool win);
|
||||
|
@ -349,8 +356,8 @@ private:
|
|||
float m_dot_size;
|
||||
float m_guardDescent;
|
||||
struct zint_structapp m_structapp;
|
||||
QColor m_fgColor;
|
||||
QColor m_bgColor;
|
||||
QString m_fgStr;
|
||||
QString m_bgStr;
|
||||
bool m_cmyk;
|
||||
int m_borderType;
|
||||
int m_borderWidth;
|
||||
|
|
|
@ -137,13 +137,27 @@ private slots:
|
|||
QCOMPARE(bc.structAppIndex(), structapp.index);
|
||||
QCOMPARE(bc.structAppID(), QString(structapp.id));
|
||||
|
||||
QString fgStr("12344567");
|
||||
bc.setFgStr(fgStr);
|
||||
QCOMPARE(bc.fgStr(), fgStr);
|
||||
|
||||
QColor fgColor(0x12, 0x34, 0x45, 0x67);
|
||||
bc.setFgColor(fgColor);
|
||||
QCOMPARE(bc.fgColor(), fgColor);
|
||||
QCOMPARE(bc.fgStr(), fgStr);
|
||||
|
||||
QString bgStr("89ABCDEF");
|
||||
bc.setBgStr(bgStr);
|
||||
QCOMPARE(bc.bgStr(), bgStr);
|
||||
|
||||
QColor bgColor(0x89, 0xAB, 0xCD, 0xEF);
|
||||
bc.setBgColor(bgColor);
|
||||
QCOMPARE(bc.bgColor(), bgColor);
|
||||
QCOMPARE(bc.bgStr(), bgStr);
|
||||
|
||||
QString bgStr2("71,0,40,44");
|
||||
bc.setBgStr(bgStr2);
|
||||
QCOMPARE(bc.bgStr(), bgStr2);
|
||||
|
||||
bool cmyk = true;
|
||||
bc.setCMYK(cmyk);
|
||||
|
@ -500,8 +514,10 @@ private slots:
|
|||
|
||||
QTest::addColumn<int>("symbology");
|
||||
QTest::addColumn<int>("inputMode");
|
||||
|
||||
QTest::addColumn<QString>("text");
|
||||
QTest::addColumn<QString>("primary");
|
||||
|
||||
QTest::addColumn<float>("height");
|
||||
QTest::addColumn<int>("option1");
|
||||
QTest::addColumn<int>("option2");
|
||||
|
@ -510,24 +526,31 @@ private slots:
|
|||
QTest::addColumn<float>("dpmm");
|
||||
QTest::addColumn<bool>("dotty");
|
||||
QTest::addColumn<float>("dotSize");
|
||||
|
||||
QTest::addColumn<float>("guardDescent");
|
||||
QTest::addColumn<int>("structAppCount");
|
||||
QTest::addColumn<int>("structAppIndex");
|
||||
QTest::addColumn<QString>("structAppID");
|
||||
|
||||
QTest::addColumn<QString>("fgStr");
|
||||
QTest::addColumn<QString>("bgStr");
|
||||
QTest::addColumn<QColor>("fgColor");
|
||||
QTest::addColumn<QColor>("bgColor");
|
||||
QTest::addColumn<bool>("cmyk");
|
||||
|
||||
QTest::addColumn<int>("borderTypeIndex");
|
||||
QTest::addColumn<int>("borderWidth");
|
||||
QTest::addColumn<int>("whitespace");
|
||||
QTest::addColumn<int>("vWhitespace");
|
||||
QTest::addColumn<int>("fontSetting");
|
||||
|
||||
QTest::addColumn<bool>("showText");
|
||||
QTest::addColumn<bool>("gsSep");
|
||||
QTest::addColumn<bool>("quietZones");
|
||||
QTest::addColumn<bool>("noQuietZones");
|
||||
QTest::addColumn<bool>("compliantHeight");
|
||||
QTest::addColumn<int>("rotateAngle");
|
||||
|
||||
QTest::addColumn<int>("eci");
|
||||
QTest::addColumn<bool>("gs1Parens");
|
||||
QTest::addColumn<bool>("gs1NoCheck");
|
||||
|
@ -553,8 +576,9 @@ private slots:
|
|||
<< BARCODE_AUSPOST << DATA_MODE // symbology-inputMode
|
||||
<< "12345678" << "" // text-primary
|
||||
<< 30.0f << -1 << 0 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -569,8 +593,9 @@ private slots:
|
|||
<< BARCODE_AZTEC << UNICODE_MODE // symbology-inputMode
|
||||
<< "12345678Ж0%var%" << "" // text-primary
|
||||
<< 0.0f << 1 << 0 << 0 << 4.0f << 0.0f << true << 0.9f // height-dotSize
|
||||
<< 5.0f << 2 << 1 << "as\"dfa'sdf" << QColor(Qt::blue) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< true << 0 << 0 << 2 << 3 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 2 << 1 << "as\"dfa'sdf" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::blue) << QColor(Qt::white) << true // fgStr-cmyk
|
||||
<< 0 << 0 << 2 << 3 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << false << 0 // showText-rotateAngle
|
||||
<< 7 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -580,12 +605,29 @@ private slots:
|
|||
" --secure=1 --structapp=\"1,2,as\\\"dfa'sdf\" --vwhitesp=3 -w 2"
|
||||
<< "" << "" << "" << "";
|
||||
|
||||
QTest::newRow("BARCODE_AZTEC") << false << 0.0f << ""
|
||||
<< BARCODE_AZTEC << UNICODE_MODE // symbology-inputMode
|
||||
<< "12345678Ж0%var%" << "" // text-primary
|
||||
<< 0.0f << 1 << 0 << 0 << 4.0f << 0.0f << true << 0.9f // height-dotSize
|
||||
<< 5.0f << 2 << 1 << "as\"dfa'sdf" // guardDescent-structAppID
|
||||
<< "71,0,40,44" << "0,0,0,0" << QColor(Qt::black) << QColor(Qt::white) << true // fgStr-cmyk
|
||||
<< 0 << 0 << 2 << 3 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << false << 0 // showText-rotateAngle
|
||||
<< 7 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
<< "zint -b 92 --bg=0,0,0,0 --cmyk --eci=7 -d '12345678Ж0%var%' --dotsize=0.9 --dotty --fg=71,0,40,44 --scale=4"
|
||||
" --secure=1 --structapp='1,2,as\"dfa'\\''sdf' --vwhitesp=3 -w 2"
|
||||
<< "zint.exe -b 92 --bg=0,0,0,0 --cmyk --eci=7 -d \"12345678Ж0%var%\" --dotsize=0.9 --dotty --fg=71,0,40,44 --scale=4"
|
||||
" --secure=1 --structapp=\"1,2,as\\\"dfa'sdf\" --vwhitesp=3 -w 2"
|
||||
<< "" << "" << "" << "";
|
||||
|
||||
QTest::newRow("BARCODE_C25INTER") << true << 0.0f << ""
|
||||
<< BARCODE_C25INTER << UNICODE_MODE // symbology-inputMode
|
||||
<< "12345" << "" // text-primary
|
||||
<< 0.0f << -1 << 2 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << SMALL_TEXT // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << SMALL_TEXT // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -597,8 +639,41 @@ private slots:
|
|||
<< BARCODE_CHANNEL << UNICODE_MODE // symbology-inputMode
|
||||
<< "453678" << "" // text-primary
|
||||
<< 19.7f << -1 << 7 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(255, 255, 255, 0) // guardDescent-bgColor
|
||||
<< false << 1 << 2 << 0 << 0 << BOLD_TEXT // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(255, 255, 255, 0) << false // fgStr-cmyk
|
||||
<< 1 << 2 << 0 << 0 << BOLD_TEXT // borderTypeIndex-fontSetting
|
||||
<< true << false << true << false << false << 90 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << true // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
<< "zint -b 140 --bind --bold --border=2 -d '453678' --height=19.7 --nobackground --quietzones"
|
||||
" --rotate=90 --verbose --vers=7"
|
||||
<< "zint.exe -b 140 --bind --bold --border=2 -d \"453678\" --height=19.7 --nobackground --quietzones"
|
||||
" --rotate=90 --verbose --vers=7"
|
||||
<< "" << "" << "" << "";
|
||||
|
||||
QTest::newRow("BARCODE_CHANNEL") << false << 0.0f << ""
|
||||
<< BARCODE_CHANNEL << UNICODE_MODE // symbology-inputMode
|
||||
<< "453678" << "" // text-primary
|
||||
<< 19.7f << -1 << 7 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "FFFFFF00" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 1 << 2 << 0 << 0 << BOLD_TEXT // borderTypeIndex-fontSetting
|
||||
<< true << false << true << false << false << 90 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << true // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
<< "zint -b 140 --bind --bold --border=2 -d '453678' --height=19.7 --nobackground --quietzones"
|
||||
" --rotate=90 --verbose --vers=7"
|
||||
<< "zint.exe -b 140 --bind --bold --border=2 -d \"453678\" --height=19.7 --nobackground --quietzones"
|
||||
" --rotate=90 --verbose --vers=7"
|
||||
<< "" << "" << "" << "";
|
||||
|
||||
QTest::newRow("BARCODE_CHANNEL") << false << 0.0f << ""
|
||||
<< BARCODE_CHANNEL << UNICODE_MODE // symbology-inputMode
|
||||
<< "453678" << "" // text-primary
|
||||
<< 19.7f << -1 << 7 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "12345600" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 1 << 2 << 0 << 0 << BOLD_TEXT // borderTypeIndex-fontSetting
|
||||
<< true << false << true << false << false << 90 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << true // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -612,8 +687,9 @@ private slots:
|
|||
<< BARCODE_CODE128 << (UNICODE_MODE | EXTRA_ESCAPE_MODE) // symbology-inputMode
|
||||
<< "1234\\^A56" << "" // text-primary
|
||||
<< 0.0f << -1 << 0 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< false << false << true << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -625,8 +701,9 @@ private slots:
|
|||
<< BARCODE_GS1_128_CC << UNICODE_MODE // symbology-inputMode
|
||||
<< "[01]12345678901231[15]121212" << "[11]901222[99]ABCDE" // text-primary
|
||||
<< 71.142f << 3 << 0 << 0 << 3.5f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< false << false << true << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -640,8 +717,9 @@ private slots:
|
|||
<< BARCODE_CODE16K << (UNICODE_MODE | HEIGHTPERROW_MODE) // symbology-inputMode
|
||||
<< "12345678901234567890123456789012" << "" // text-primary
|
||||
<< 0.0f << 4 << 0 << 2 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 1 << 1 << 0 << 0 << SMALL_TEXT // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 1 << 1 << 0 << 0 << SMALL_TEXT // borderTypeIndex-fontSetting
|
||||
<< true << false << false << true << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -655,8 +733,9 @@ private slots:
|
|||
<< BARCODE_CODE49 << UNICODE_MODE // symbology-inputMode
|
||||
<< "12345678901234567890" << "" // text-primary
|
||||
<< 30.0f << -1 << 0 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -668,8 +747,9 @@ private slots:
|
|||
<< BARCODE_CODABLOCKF << (DATA_MODE | ESCAPE_MODE) // symbology-inputMode
|
||||
<< "T\\n\\xA0t\\\"" << "" // text-primary
|
||||
<< 0.0f << 2 << 5 << 3 << 3.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 2 << 4 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 2 << 4 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << true << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -683,8 +763,9 @@ private slots:
|
|||
<< BARCODE_DAFT << UNICODE_MODE // symbology-inputMode
|
||||
<< "daft" << "" // text-primary
|
||||
<< 9.2f << -1 << 251 << 0 << 1.0f << 0.0f << false << 0.7f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(0x30, 0x31, 0x32, 0x33) << QColor(0xBF, 0xBE, 0xBD, 0xBC) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(0x30, 0x31, 0x32, 0x33) << QColor(0xBF, 0xBE, 0xBD, 0xBC) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -696,8 +777,9 @@ private slots:
|
|||
<< BARCODE_DATAMATRIX << GS1_MODE // symbology-inputMode
|
||||
<< "[20]12" << "" // text-primary
|
||||
<< 0.0f << -1 << 0 << DM_SQUARE << 1.0f << 0.0f << false << 0.7f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << true << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -709,8 +791,9 @@ private slots:
|
|||
<< BARCODE_DATAMATRIX << (DATA_MODE | ESCAPE_MODE | FAST_MODE) // symbology-inputMode
|
||||
<< "ABCDEFGH\\x01I" << "" // text-primary
|
||||
<< 0.0f << -1 << 0 << 0 << 1.0f << 0.0f << false << 0.7f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -722,8 +805,9 @@ private slots:
|
|||
<< BARCODE_DBAR_EXPSTK_CC << (DATA_MODE | HEIGHTPERROW_MODE) // symbology-inputMode
|
||||
<< "[91]ABCDEFGHIJKL" << "[11]901222[99]ABCDE" // text-primary
|
||||
<< 0.0f << -1 << 0 << 2 << 1.0f << 0.0f << true << 0.9f // height-dotSize
|
||||
<< 3.0f << 2 << 1 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 3.0f << 2 << 1 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -737,8 +821,9 @@ private slots:
|
|||
<< BARCODE_DOTCODE << GS1_MODE // symbology-inputMode
|
||||
<< "[20]01" << "" // text-primary
|
||||
<< 30.0f << -1 << 8 << ((0 + 1) << 8) << 1.0f << 0.0f << false << 0.7f // height-dotSize
|
||||
<< 0.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 0.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -750,8 +835,9 @@ private slots:
|
|||
<< BARCODE_DOTCODE << GS1_MODE // symbology-inputMode
|
||||
<< "[20]01" << "" // text-primary
|
||||
<< 30.0f << -1 << 8 << ((0 + 1) << 8) << 1.0f << 0.0f << false << 0.7f // height-dotSize
|
||||
<< 0.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 0.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -763,8 +849,9 @@ private slots:
|
|||
<< BARCODE_DPD << UNICODE_MODE // symbology-inputMode
|
||||
<< "1234567890123456789012345678" << "" // text-primary
|
||||
<< 0.0f << -1 << 0 << 0 << 4.5f << 24.0f << true << 0.8f // height-dotSize
|
||||
<< 0.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 0.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.375 << 0 << 600 << 1 << 0 << 0 // xdimdp
|
||||
|
@ -777,8 +864,9 @@ private slots:
|
|||
<< BARCODE_EANX << UNICODE_MODE // symbology-inputMode
|
||||
<< "123456789012+12" << "" // text-primary
|
||||
<< 0.0f << -1 << 8 << 0 << 1.0f << 0.0f << true << 0.8f // height-dotSize
|
||||
<< 0.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 0.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -790,8 +878,9 @@ private slots:
|
|||
<< BARCODE_GRIDMATRIX << UNICODE_MODE // symbology-inputMode
|
||||
<< "Your Data Here!" << "" // text-primary
|
||||
<< 0.0f << 1 << 5 << 0 << 0.5f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << true << false << true << 270 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -803,8 +892,9 @@ private slots:
|
|||
<< BARCODE_HANXIN << (UNICODE_MODE | ESCAPE_MODE) // symbology-inputMode
|
||||
<< "éβÿ啊\\e\"'" << "" // text-primary
|
||||
<< 30.0f << 2 << 5 << ((0 + 1) << 8) << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 29 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -816,8 +906,9 @@ private slots:
|
|||
<< BARCODE_HIBC_DM << UNICODE_MODE // symbology-inputMode
|
||||
<< "1234" << "" // text-primary
|
||||
<< 0.0f << -1 << 8 << DM_DMRE << 1.0f << 0.0f << false << 0.7f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << true << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -829,8 +920,9 @@ private slots:
|
|||
<< BARCODE_HIBC_PDF << (DATA_MODE | HEIGHTPERROW_MODE) // symbology-inputMode
|
||||
<< "TEXT" << "" // text-primary
|
||||
<< 3.5f << 3 << 4 << 10 << 10.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 2 << 1 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 2 << 1 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << true << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -844,8 +936,9 @@ private slots:
|
|||
<< BARCODE_ITF14 << UNICODE_MODE // symbology-inputMode
|
||||
<< "9212320967145" << "" // text-primary
|
||||
<< 30.0f << -1 << 0 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -857,8 +950,9 @@ private slots:
|
|||
<< BARCODE_ITF14 << UNICODE_MODE // symbology-inputMode
|
||||
<< "9212320967145" << "" // text-primary
|
||||
<< 30.0f << -1 << 0 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 1 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 1 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -871,8 +965,9 @@ private slots:
|
|||
<< "152382802840001"
|
||||
<< "1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G1 MAIN ST\\GTOWN\\GNY\\R\\E" // text-primary
|
||||
<< 0.0f << -1 << (96 + 1) << 0 << 2.5f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << true << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -886,8 +981,9 @@ private slots:
|
|||
<< BARCODE_MICROQR << UNICODE_MODE // symbology-inputMode
|
||||
<< "1234" << "" // text-primary
|
||||
<< 30.0f << 2 << 3 << (ZINT_FULL_MULTIBYTE | (3 + 1) << 8) << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -899,8 +995,9 @@ private slots:
|
|||
<< BARCODE_QRCODE << GS1_MODE // symbology-inputMode
|
||||
<< "(01)12" << "" // text-primary
|
||||
<< 0.0f << 1 << 5 << (ZINT_FULL_MULTIBYTE | (0 + 1) << 8) << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << true << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << true << true << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -914,8 +1011,9 @@ private slots:
|
|||
<< BARCODE_RMQR << UNICODE_MODE // symbology-inputMode
|
||||
<< "テ" << "" // text-primary
|
||||
<< 30.0f << -1 << 8 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 180 // showText-rotateAngle
|
||||
<< 20 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -927,8 +1025,9 @@ private slots:
|
|||
<< BARCODE_ULTRA << (GS1_MODE | GS1PARENS_MODE | GS1NOCHECK_MODE) // symbology-inputMode
|
||||
<< "(01)1" << "" // text-primary
|
||||
<< 0.0f << 6 << 2 << 0 << 1.0f << 0.0f << true << 0.8f // height-dotSize
|
||||
<< 5.0f << 2 << 1 << "4" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 2 << 1 << "4" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -940,8 +1039,9 @@ private slots:
|
|||
<< BARCODE_UPCE_CC << UNICODE_MODE // symbology-inputMode
|
||||
<< "12345670+1234" << "[11]901222[99]ABCDE" // text-primary
|
||||
<< 0.0f << -1 << 0 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 6.5f << 0 << 0 << "" << QColor(0xEF, 0x29, 0x29) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << (BOLD_TEXT | SMALL_TEXT) // cmyk-fontSetting
|
||||
<< 6.5f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(0xEF, 0x29, 0x29) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << (BOLD_TEXT | SMALL_TEXT) // borderTypeIndex-fontSetting
|
||||
<< true << false << false << true << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_FAIL_ALL << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -961,8 +1061,9 @@ private slots:
|
|||
<< BARCODE_VIN << UNICODE_MODE // symbology-inputMode
|
||||
<< "12345678701234567" << "" // text-primary
|
||||
<< 20.0f << -1 << 1 << 0 << 1.0f << 0.0f << false << 0.8f // height-dotSize
|
||||
<< 5.0f << 0 << 0 << "" << QColor(Qt::black) << QColor(Qt::white) // guardDescent-bgColor
|
||||
<< false << 0 << 0 << 0 << 0 << 0 // cmyk-fontSetting
|
||||
<< 5.0f << 0 << 0 << "" // guardDescent-structAppID
|
||||
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
|
||||
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
|
||||
<< true << false << false << false << true << 0 // showText-rotateAngle
|
||||
<< 0 << false << false << false << WARN_DEFAULT << false // eci-debug
|
||||
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
|
||||
|
@ -997,6 +1098,8 @@ private slots:
|
|||
QFETCH(int, structAppCount);
|
||||
QFETCH(int, structAppIndex);
|
||||
QFETCH(QString, structAppID);
|
||||
QFETCH(QString, fgStr);
|
||||
QFETCH(QString, bgStr);
|
||||
QFETCH(QColor, fgColor);
|
||||
QFETCH(QColor, bgColor);
|
||||
QFETCH(bool, cmyk);
|
||||
|
@ -1050,8 +1153,16 @@ private slots:
|
|||
bc.setDotSize(dotSize);
|
||||
bc.setGuardDescent(guardDescent);
|
||||
bc.setStructApp(structAppCount, structAppIndex, structAppID);
|
||||
bc.setFgColor(fgColor);
|
||||
bc.setBgColor(bgColor);
|
||||
if (fgStr.isEmpty()) {
|
||||
bc.setFgColor(fgColor);
|
||||
} else {
|
||||
bc.setFgStr(fgStr);
|
||||
}
|
||||
if (bgStr.isEmpty()) {
|
||||
bc.setBgColor(bgColor);
|
||||
} else {
|
||||
bc.setBgStr(bgStr);
|
||||
}
|
||||
bc.setCMYK(cmyk);
|
||||
bc.setBorderType(borderTypeIndex);
|
||||
bc.setBorderWidth(borderWidth);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue