mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-16 08:04:36 -04:00
- AZTEC/CHANNEL/CODABLOCKF/CODE16K/CODE49/CODEONE/DATAMATRIX/
DOTCODE/GRIDMATRIX/HANXIN/MICROPDF417/MICROQR/PDF417/QRCODE/ RMQR/ULTRA: set `option_1/2/3` to values used in encodation ("Feedback options"), and add new access methods `encodedOption1()` etc. to Qt Backend, and use in GUI to provide better feedback on "Automatic" selections - AZTEC: give more precise warnings in low ECC situations, and indicate via `option_1` by setting to -1 (min 3 words), 0 (<5% + 3 words) (`ecc_ratio`) - set_height: fix non-compliance false positives by using epsilon in checks (prompted by CODABLOCKF non-compliant warning for zint-generated compliant height - floating point `rows` mult != `zero_count` div; one test regression for CODE93); better warning messages on non-compliant heights (min/max) - manual/man page: fix DATAMATRIX Sizes tables "28 12x26" -> "27 12x26" - GUI: AZTEC/CODEONE: add Zint versions to comboboxes - DOTCODE: improve error messages re size too small/large - ULTRA: better ZINT_TEST codeword dump (ZINT_DEBUG_TEST) - general: various tabs -> spaces; prettify main .rc files; trailing spaces; small amount of code fiddling (CODE16K)
This commit is contained in:
parent
d0465375bb
commit
d222add96d
68 changed files with 1929 additions and 1497 deletions
|
@ -847,6 +847,7 @@ INTERNAL int set_height(struct zint_symbol *symbol, const float min_row_height,
|
|||
float row_height;
|
||||
int i;
|
||||
const int rows = symbol->rows ? symbol->rows : 1; /* Sometimes called before expand() */
|
||||
const float epsilon = 0.00000095367431640625f; /* Allow some leeway in non-compliance checks */
|
||||
|
||||
for (i = 0; i < rows; i++) {
|
||||
if (symbol->row_height[i]) {
|
||||
|
@ -872,10 +873,10 @@ INTERNAL int set_height(struct zint_symbol *symbol, const float min_row_height,
|
|||
row_height = 0.5f;
|
||||
}
|
||||
if (min_row_height) {
|
||||
if (stripf(row_height) < stripf(min_row_height)) {
|
||||
if (stripf(row_height + epsilon) < stripf(min_row_height)) {
|
||||
error_number = ZINT_WARN_NONCOMPLIANT;
|
||||
if (!no_errtxt) {
|
||||
errtxt(0, symbol, 247, "Height not compliant with standards");
|
||||
ZEXT errtxtf(0, symbol, 247, "Height not compliant with standards (minimum %g)", min_row_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -884,10 +885,10 @@ INTERNAL int set_height(struct zint_symbol *symbol, const float min_row_height,
|
|||
symbol->height = stripf(fixed_height); /* Ignore any given height */
|
||||
}
|
||||
if (max_height) {
|
||||
if (stripf(symbol->height) > stripf(max_height)) {
|
||||
if (stripf(symbol->height) > stripf(max_height + epsilon)) {
|
||||
error_number = ZINT_WARN_NONCOMPLIANT;
|
||||
if (!no_errtxt) {
|
||||
errtxt(0, symbol, 248, "Height not compliant with standards");
|
||||
ZEXT errtxtf(0, symbol, 248, "Height not compliant with standards (maximum %g)", max_height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue