mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-12 22:25:59 -04:00
Add HEIGHTPERROW_MODE_input mode flag (#204)
backend_qt: add encodedWidth, encodedRows DBAR_EXPSTK: add max rows option (option_3) CODE16K/CODE49: add min rows option (option_1) GUI: HIBC xxx -> HIBC
This commit is contained in:
parent
96cf5aa668
commit
e14d9e99d5
36 changed files with 2453 additions and 608 deletions
|
@ -246,6 +246,20 @@ INTERNAL int code49(struct zint_symbol *symbol, unsigned char source[], int leng
|
|||
rows++;
|
||||
}
|
||||
|
||||
if (symbol->option_1 >= 2 && symbol->option_1 <= 8) { /* Minimum no. of rows */
|
||||
if (symbol->option_1 > rows) {
|
||||
for (j = symbol->option_1 - rows; j > 0; j--) {
|
||||
for (i = 0; i < 7; i++) {
|
||||
c_grid[rows][i] = 48; /* Pad */
|
||||
}
|
||||
rows++;
|
||||
}
|
||||
}
|
||||
} else if (symbol->option_1 >= 1) {
|
||||
strcpy(symbol->errtxt, "424: Minimum number of rows out of range (2 to 8)");
|
||||
return ZINT_ERROR_INVALID_OPTION;
|
||||
}
|
||||
|
||||
/* Add row count and mode character */
|
||||
c_grid[rows - 1][6] = (7 * (rows - 2)) + M;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue