Add 'force Data Matrix to square symbol' option.

This commit is contained in:
hooper114 2009-08-14 16:52:08 +00:00
parent 17c504e724
commit 0d5c7cf9d3
2 changed files with 16 additions and 1 deletions

View File

@ -811,6 +811,19 @@ int data_matrix_200(struct zint_symbol *symbol, unsigned char source[])
}
}
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];
FH = matrixFH[symbolsize];

View File

@ -151,6 +151,8 @@ struct zint_symbol {
#define KANJI_MODE 3
#define SJIS_MODE 4
#define DM_SQUARE 100
#define WARN_INVALID_OPTION 2
#define ERROR_TOO_LONG 5
#define ERROR_INVALID_DATA 6