mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Flag if DM_SQUARE is used at the same time as symbol size selection
This commit is contained in:
parent
6fa66d5554
commit
24f175b6f6
@ -1181,6 +1181,10 @@ int data_matrix_200(struct zint_symbol *symbol,const unsigned char source[], con
|
|||||||
while (matrixH[calcsize] != matrixW[calcsize]) {
|
while (matrixH[calcsize] != matrixW[calcsize]) {
|
||||||
calcsize++;
|
calcsize++;
|
||||||
}
|
}
|
||||||
|
if (optionsize != -1) {
|
||||||
|
strcpy(symbol->errtxt, "Can not force square symbols when symbol size is selected");
|
||||||
|
error_number = ZINT_WARN_INVALID_OPTION;
|
||||||
|
}
|
||||||
} else if (symbol->option_3 != DM_DMRE) {
|
} else if (symbol->option_3 != DM_DMRE) {
|
||||||
/* Skip DMRE symbols */
|
/* Skip DMRE symbols */
|
||||||
while (isDMRE[calcsize]) {
|
while (isDMRE[calcsize]) {
|
||||||
|
@ -1771,9 +1771,9 @@ Input | Symbol Size
|
|||||||
30 | 16 x 48
|
30 | 16 x 48
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
To force Zint only to use square symbols (versions 1-24) at the command line
|
When using automatic symbol sizes you can force Zint to use square symbols
|
||||||
use the option --square and when using the API set the value option_3 =
|
(versions 1-24) at the command line by using the option --square and when
|
||||||
DM_SQUARE.
|
using the API by setting the value option_3 = DM_SQUARE.
|
||||||
|
|
||||||
Data Matrix Rectangular Extension (DMRE) codes may be generated with the
|
Data Matrix Rectangular Extension (DMRE) codes may be generated with the
|
||||||
following values as before:
|
following values as before:
|
||||||
|
@ -744,7 +744,11 @@ int main(int argc, char **argv) {
|
|||||||
strcat(my_symbol->outfile, filetype);
|
strcat(my_symbol->outfile, filetype);
|
||||||
}
|
}
|
||||||
error_number = escape_char_process(my_symbol, (unsigned char*) optarg, strlen(optarg));
|
error_number = escape_char_process(my_symbol, (unsigned char*) optarg, strlen(optarg));
|
||||||
if (error_number == 0) {
|
if (error_number < 5) {
|
||||||
|
if (error_number != 0) {
|
||||||
|
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
error_number = ZBarcode_Print(my_symbol, rotate_angle);
|
error_number = ZBarcode_Print(my_symbol, rotate_angle);
|
||||||
}
|
}
|
||||||
generated = 1;
|
generated = 1;
|
||||||
@ -763,7 +767,11 @@ int main(int argc, char **argv) {
|
|||||||
case 'i': /* Take data from file */
|
case 'i': /* Take data from file */
|
||||||
if (batch_mode == 0) {
|
if (batch_mode == 0) {
|
||||||
error_number = ZBarcode_Encode_File(my_symbol, optarg);
|
error_number = ZBarcode_Encode_File(my_symbol, optarg);
|
||||||
if (error_number == 0) {
|
if (error_number < 5) {
|
||||||
|
if (error_number != 0) {
|
||||||
|
fprintf(stderr, "%s\n", my_symbol->errtxt);
|
||||||
|
fflush(stderr);
|
||||||
|
}
|
||||||
error_number = ZBarcode_Print(my_symbol, rotate_angle);
|
error_number = ZBarcode_Print(my_symbol, rotate_angle);
|
||||||
}
|
}
|
||||||
generated = 1;
|
generated = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user