mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-16 16:14:36 -04:00
Add 'force Data Matrix to square symbol' option.
This commit is contained in:
parent
17c504e724
commit
0d5c7cf9d3
2 changed files with 16 additions and 1 deletions
|
@ -799,7 +799,7 @@ int data_matrix_200(struct zint_symbol *symbol, unsigned char source[])
|
|||
}
|
||||
}
|
||||
calcsize++;
|
||||
|
||||
|
||||
if(calcsize <= optionsize) {
|
||||
symbolsize = optionsize;
|
||||
} else {
|
||||
|
@ -810,6 +810,19 @@ int data_matrix_200(struct zint_symbol *symbol, unsigned char source[])
|
|||
strcpy(symbol->errtxt, "Data does not fit in selected symbol size");
|
||||
}
|
||||
}
|
||||
|
||||
if(symbol->option_3 == DM_SQUARE) {
|
||||
/* Force to use square symbol */
|
||||
switch(symbolsize) {
|
||||
case 2:
|
||||
case 4:
|
||||
case 6:
|
||||
case 9:
|
||||
case 11:
|
||||
case 14:
|
||||
symbolsize++;
|
||||
}
|
||||
}
|
||||
|
||||
H = matrixH[symbolsize];
|
||||
W = matrixW[symbolsize];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue