mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Don't include LeftRAP with CC-A
Implement missed rule from ISO 24723 section 8.2 - 3-column CC-A components have the left Row Address Pattern omitted. Partially resolves #146 reported by Gregory Van Vooren
This commit is contained in:
parent
6751a816a6
commit
ae737ea019
@ -276,7 +276,9 @@ static int cc_a(struct zint_symbol *symbol, char source[], int cc_width) {
|
||||
dummy[j + 1] = codeWords[i * cc_width + j];
|
||||
}
|
||||
/* Copy the data into codebarre */
|
||||
bin_append(rap_side[LeftRAP - 1], 10, pattern);
|
||||
if (cc_width != 3) {
|
||||
bin_append(rap_side[LeftRAP - 1], 10, pattern);
|
||||
}
|
||||
bin_append(pdf_bitpattern[offset + dummy[1]], 16, pattern);
|
||||
strcat(pattern, "0");
|
||||
if (cc_width == 3) {
|
||||
@ -1793,7 +1795,11 @@ int composite(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
case 7: /* EAN-8 */
|
||||
case 10: /* EAN-8 + 2 */
|
||||
case 13: /* EAN-8 + 5 */
|
||||
bottom_shift = 13;
|
||||
if (cc_mode == 1) {
|
||||
bottom_shift = 3;
|
||||
} else {
|
||||
bottom_shift = 13;
|
||||
}
|
||||
break;
|
||||
case 12: /* EAN-13 */
|
||||
case 15: /* EAN-13 + 2 */
|
||||
@ -1808,7 +1814,12 @@ int composite(struct zint_symbol *symbol, unsigned char source[], int length) {
|
||||
break;
|
||||
case BARCODE_RSS14_CC: bottom_shift = 4;
|
||||
break;
|
||||
case BARCODE_RSS_LTD_CC: bottom_shift = 9;
|
||||
case BARCODE_RSS_LTD_CC:
|
||||
if (cc_mode == 1) {
|
||||
top_shift = 1;
|
||||
} else {
|
||||
bottom_shift = 9;
|
||||
}
|
||||
break;
|
||||
case BARCODE_RSS_EXP_CC: k = 1;
|
||||
while ((!(module_is_set(linear, 1, k - 1))) && module_is_set(linear, 1, k)) {
|
||||
|
@ -788,7 +788,7 @@ int eanx(struct zint_symbol *symbol, unsigned char source[], int src_len) {
|
||||
set_module(symbol, symbol->rows + 1, 0);
|
||||
set_module(symbol, symbol->rows + 1, 68);
|
||||
set_module(symbol, symbol->rows + 2, 1);
|
||||
set_module(symbol, symbol->rows + 1, 67);
|
||||
set_module(symbol, symbol->rows + 2, 67);
|
||||
symbol->row_height[symbol->rows] = 2;
|
||||
symbol->row_height[symbol->rows + 1] = 2;
|
||||
symbol->row_height[symbol->rows + 2] = 2;
|
||||
|
Loading…
Reference in New Issue
Block a user