mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13: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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user