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:
gitlost 2023-11-19 19:39:54 +00:00
parent ca964f9098
commit 323b34502b
113 changed files with 2016 additions and 1550 deletions

View file

@ -111,69 +111,24 @@ INTERNAL int pcx_pixel_plot(struct zint_symbol *symbol, const unsigned char *pix
const unsigned char ch = pb[column];
switch (colour) {
case 0:
switch (ch) {
case 'W': /* White */
case 'M': /* Magenta */
case 'R': /* Red */
case 'Y': /* Yellow */
rle_row[column] = 255;
break;
case 'C': /* Cyan */
case 'B': /* Blue */
case 'G': /* Green */
case 'K': /* Black */
rle_row[column] = 0;
break;
case '1':
rle_row[column] = fgred;
break;
default:
rle_row[column] = bgred;
break;
if (ch == '0' || ch == '1') {
rle_row[column] = ch != '0' ? fgred : bgred;
} else {
out_colour_char_to_rgb(ch, &rle_row[column], NULL, NULL);
}
break;
case 1:
switch (ch) {
case 'W': /* White */
case 'C': /* Cyan */
case 'Y': /* Yellow */
case 'G': /* Green */
rle_row[column] = 255;
break;
case 'B': /* Blue */
case 'M': /* Magenta */
case 'R': /* Red */
case 'K': /* Black */
rle_row[column] = 0;
break;
case '1':
rle_row[column] = fggrn;
break;
default:
rle_row[column] = bggrn;
break;
if (ch == '0' || ch == '1') {
rle_row[column] = ch != '0' ? fggrn : bggrn;
} else {
out_colour_char_to_rgb(ch, NULL, &rle_row[column], NULL);
}
break;
case 2:
switch (ch) {
case 'W': /* White */
case 'C': /* Cyan */
case 'B': /* Blue */
case 'M': /* Magenta */
rle_row[column] = 255;
break;
case 'R': /* Red */
case 'Y': /* Yellow */
case 'G': /* Green */
case 'K': /* Black */
rle_row[column] = 0;
break;
case '1':
rle_row[column] = fgblu;
break;
default:
rle_row[column] = bgblu;
break;
if (ch == '0' || ch == '1') {
rle_row[column] = ch != '0' ? fgblu : bgblu;
} else {
out_colour_char_to_rgb(ch, NULL, NULL, &rle_row[column]);
}
break;
case 3: