mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-12 22:25:59 -04:00
Change height and row_height array to floats; DAFT tracker ratio
This commit is contained in:
parent
22a6c583af
commit
c693482aa1
63 changed files with 2708 additions and 1418 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
/*
|
||||
libzint - the open source barcode library
|
||||
Copyright (C) 2008 - 2020 Robin Stuart <rstuart114@gmail.com>
|
||||
Copyright (C) 2008 - 2021 Robin Stuart <rstuart114@gmail.com>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -116,14 +116,15 @@ INTERNAL int code16k(struct zint_symbol *symbol, unsigned char source[], int len
|
|||
int values[C128_MAX] = {0};
|
||||
int bar_characters;
|
||||
float glyph_count;
|
||||
int error_number, first_sum, second_sum;
|
||||
int error_number = 0, first_sum, second_sum;
|
||||
int input_length;
|
||||
int gs1, c_count;
|
||||
int separator;
|
||||
float min_row_height;
|
||||
|
||||
/* Suppresses clang-analyzer-core.UndefinedBinaryOperatorResult warning on fset which is fully set */
|
||||
assert(length > 0);
|
||||
|
||||
error_number = 0;
|
||||
strcpy(width_pattern, "");
|
||||
input_length = length;
|
||||
|
||||
|
@ -487,12 +488,22 @@ INTERNAL int code16k(struct zint_symbol *symbol, unsigned char source[], int len
|
|||
flip_flop = 0;
|
||||
}
|
||||
}
|
||||
symbol->row_height[current_row] = 10;
|
||||
}
|
||||
|
||||
symbol->rows = rows;
|
||||
symbol->width = 70;
|
||||
|
||||
#ifdef COMPLIANT_HEIGHTS
|
||||
separator = symbol->option_3 >= 1 && symbol->option_3 <= 4 ? symbol->option_3 : 1;
|
||||
/* BS EN 12323:2005 Section 4.5 (d) minimum 8X; use 10 * rows as default for back-compatibility */
|
||||
min_row_height = 8.0f + separator;
|
||||
error_number = set_height(symbol, min_row_height, (min_row_height > 10.0f ? min_row_height : 10.0f) * rows, 0.0f,
|
||||
0 /*no_errtxt*/);
|
||||
#else
|
||||
(void)min_row_height; (void)separator;
|
||||
(void) set_height(symbol, 0.0f, 10.0f * rows, 0.0f, 1 /*no_errtxt*/);
|
||||
#endif
|
||||
|
||||
symbol->output_options |= BARCODE_BIND;
|
||||
|
||||
if (symbol->border_width == 0) { /* Allow override if non-zero */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue