mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-27 13:34:19 -04:00
zint.h: increase symbol->text
size 160 -> 200;
rename `ZINT_CAP_EXTENDABLE` -> `ZINT_CAP_EANUPC` (`ZINT_CAP_EXTENDABLE` marked as legacy) CODE128: increase no. symbol chars max 60 -> 99 EAN-2/EAN-5: fix `BARCODE_BIND_TOP/BIND/BOX` output GS1_128: warn if data > 48 (GS1 General Specifications max) common: `is_extendable()` -> `is_ucpean()` raster: add `ZFONT_HALIGN_CENTRE/LEFT/RIGHT` flags and process in `draw_string()` (for drawing EAN/UPC outside digits), and for `ZFONT_HALIGN_CENTRE` round when calculating centre (shifts some texts 1 pixel left) raster/vector: use offsets into `symbol->text` for EAN/UPC instead of `out_upcean_split_text()` (removed) BMP/EMF/GIF/PCX/PNG/PS/SVG/TIF: use new `out_colour_get_rgb()` routine (replaces `colour_to_XXX()`) general: simplify/fix some `error_number` handling/returning frontend: truncate overlong `--primary` instead of ignoring; negative floating pt option (for `--textgap`) man page: list size detail for matrix symbols (`--vers`) manual: further fiddling with scaling text; some typos
This commit is contained in:
parent
ca964f9098
commit
323b34502b
113 changed files with 2016 additions and 1550 deletions
|
@ -269,8 +269,8 @@ INTERNAL int is_stackable(const int symbology) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Whether `symbology` can have add-on (EAN-2 and EAN-5) */
|
||||
INTERNAL int is_extendable(const int symbology) {
|
||||
/* Whether `symbology` is EAN/UPC */
|
||||
INTERNAL int is_upcean(const int symbology) {
|
||||
|
||||
switch (symbology) {
|
||||
case BARCODE_EANX:
|
||||
|
@ -592,54 +592,6 @@ INTERNAL void segs_cpy(const struct zint_symbol *symbol, const struct zint_seg s
|
|||
}
|
||||
}
|
||||
|
||||
/* Returns red component if any of ultra colour indexing "0CBMRYGKW" */
|
||||
INTERNAL int colour_to_red(const int colour) {
|
||||
int return_val = 0;
|
||||
|
||||
switch (colour) {
|
||||
case 8: /* White */
|
||||
case 3: /* Magenta */
|
||||
case 4: /* Red */
|
||||
case 5: /* Yellow */
|
||||
return_val = 255;
|
||||
break;
|
||||
}
|
||||
|
||||
return return_val;
|
||||
}
|
||||
|
||||
/* Returns green component if any of ultra colour indexing "0CBMRYGKW" */
|
||||
INTERNAL int colour_to_green(const int colour) {
|
||||
int return_val = 0;
|
||||
|
||||
switch (colour) {
|
||||
case 8: /* White */
|
||||
case 1: /* Cyan */
|
||||
case 5: /* Yellow */
|
||||
case 6: /* Green */
|
||||
return_val = 255;
|
||||
break;
|
||||
}
|
||||
|
||||
return return_val;
|
||||
}
|
||||
|
||||
/* Returns blue component if any of ultra colour indexing "0CBMRYGKW" */
|
||||
INTERNAL int colour_to_blue(const int colour) {
|
||||
int return_val = 0;
|
||||
|
||||
switch (colour) {
|
||||
case 8: /* White */
|
||||
case 1: /* Cyan */
|
||||
case 2: /* Blue */
|
||||
case 3: /* Magenta */
|
||||
return_val = 255;
|
||||
break;
|
||||
}
|
||||
|
||||
return return_val;
|
||||
}
|
||||
|
||||
#ifdef ZINT_TEST
|
||||
/* Dumps hex-formatted codewords in symbol->errtxt (for use in testing) */
|
||||
INTERNAL void debug_test_codeword_dump(struct zint_symbol *symbol, const unsigned char *codewords, const int length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue