mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-19 10:57:07 +00:00
Add 'force Data Matrix to square symbol' option.
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user