Ultra: Correct clock pattern generation, add work around to avoid negative UCC and output to colour SVG

This commit is contained in:
Robin Stuart
2019-12-18 18:33:18 +00:00
parent e6ab17086c
commit d370f3c0c7
4 changed files with 156 additions and 103 deletions

View File

@ -148,7 +148,11 @@ int ustrchr_cnt(const unsigned char string[], const size_t length, const unsigne
/* Return true (1) if a module is dark/black, otherwise false (0) */
int module_is_set(const struct zint_symbol *symbol, const int y_coord, const int x_coord) {
return (symbol->encoded_data[y_coord][x_coord / 7] >> (x_coord % 7)) & 1;
if (symbol->symbology == BARCODE_ULTRA) {
return symbol->encoded_data[y_coord][x_coord];
} else {
return (symbol->encoded_data[y_coord][x_coord / 7] >> (x_coord % 7)) & 1;
}
}
/* Set a module to dark/black */