diff --git a/ChangeLog b/ChangeLog index 193a90f4..ace3b353 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ Version 2.10.0.9 (dev) not released yet ======================================= +**Incompatible changes** +------------------------ +- Add width to struct zint_vector_circle + NOTE: backward incompatible drawing of MaxiCode finder (bullseye) + Changes ------- - RMQR: add ECI support diff --git a/backend/emf.c b/backend/emf.c index d3e4e31b..da9b4524 100644 --- a/backend/emf.c +++ b/backend/emf.c @@ -68,7 +68,8 @@ static int count_circles(struct zint_symbol *symbol) { circ = circ->next; } - return circles; + /* Hack for MaxiCode */ + return symbol->symbology == BARCODE_MAXICODE ? circles * 2 : circles; } static int count_hexagons(struct zint_symbol *symbol) { @@ -258,9 +259,9 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) { emr_ellipse_t circle[circle_count ? circle_count : 1]; emr_polygon_t hexagon[hexagon_count ? hexagon_count : 1]; #else - rectangle = (emr_rectangle_t*) _alloca(rectangle_count * sizeof(emr_rectangle_t)); - circle = (emr_ellipse_t*) _alloca(circle_count * sizeof(emr_ellipse_t)); - hexagon = (emr_polygon_t*) _alloca(hexagon_count * sizeof(emr_polygon_t)); + rectangle = (emr_rectangle_t *) _alloca(rectangle_count * sizeof(emr_rectangle_t)); + circle = (emr_ellipse_t *) _alloca(circle_count * sizeof(emr_ellipse_t)); + hexagon = (emr_polygon_t *) _alloca(hexagon_count * sizeof(emr_polygon_t)); #endif // Calculate how many coloured rectangles @@ -463,8 +464,10 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) { circ = symbol->vector->circles; this_circle = 0; while (circ) { - if (previous_diameter != circ->diameter) { - previous_diameter = circ->diameter; + /* Note using circle width the proper way, with a non-null pen of specified width and a null brush for fill, + causes various different rendering issues for LibreOffice Draw and Inkscape, so using following hack */ + if (previous_diameter != circ->diameter + circ->width) { /* Drawing MaxiCode bullseye using overlayed discs */ + previous_diameter = circ->diameter + circ->width; radius = (float) (0.5 * previous_diameter); } circle[this_circle].type = 0x0000002a; // EMR_ELLIPSE @@ -476,6 +479,20 @@ INTERNAL int emf_plot(struct zint_symbol *symbol, int rotate_angle) { this_circle++; bytecount += 24; recordcount++; + + if (symbol->symbology == BARCODE_MAXICODE) { /* Drawing MaxiCode bullseye using overlayed discs */ + float inner_radius = radius - circ->width; + circle[this_circle].type = 0x0000002a; // EMR_ELLIPSE + circle[this_circle].size = 24; + circle[this_circle].box.top = (int32_t) (circ->y - inner_radius); + circle[this_circle].box.bottom = (int32_t) (circ->y + inner_radius); + circle[this_circle].box.left = (int32_t) (circ->x - inner_radius); + circle[this_circle].box.right = (int32_t) (circ->x + inner_radius); + this_circle++; + bytecount += 24; + recordcount++; + } + circ = circ->next; } diff --git a/backend/maxicode.c b/backend/maxicode.c index 18c0551d..0d9199ec 100644 --- a/backend/maxicode.c +++ b/backend/maxicode.c @@ -1,4 +1,4 @@ -/* maxicode.c - Handles Maxicode */ +/* maxicode.c - Handles MaxiCode */ /* libzint - the open source barcode library diff --git a/backend/ps.c b/backend/ps.c index b8c204a6..22cefd80 100644 --- a/backend/ps.c +++ b/backend/ps.c @@ -154,6 +154,7 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) { int i, len; int ps_len = 0; int iso_latin1 = 0; + int have_circles_with_width = 0, have_circles_without_width = 0; const int output_to_stdout = symbol->output_options & BARCODE_STDOUT; #ifdef _MSC_VER unsigned char *ps_string; @@ -263,6 +264,15 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) { ps_string = (unsigned char *) _alloca(ps_len + 1); #endif + /* Check for circle widths */ + for (circle = symbol->vector->circles; circle; circle = circle->next) { + if (circle->width) { + have_circles_with_width = 1; + } else { + have_circles_without_width = 1; + } + } + /* Start writing the header */ fprintf(feps, "%%!PS-Adobe-3.0 EPSF-3.0\n"); if (ZINT_VERSION_BUILD) { @@ -278,11 +288,21 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) { fprintf(feps, "%%%%EndComments\n"); /* Definitions */ - fprintf(feps, "/TL { setlinewidth moveto lineto stroke } bind def\n"); - fprintf(feps, "/TD { newpath 0 360 arc fill } bind def\n"); - fprintf(feps, "/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def\n"); + if (have_circles_without_width) { + /* Disc: x y radius TD */ + fprintf(feps, "/TD { newpath 0 360 arc fill } bind def\n"); + } + if (have_circles_with_width) { + /* Circle (ring): x y radius width TC (adapted from BWIPP renmaxicode.ps) */ + fprintf(feps, "/TC { newpath 4 1 roll 3 copy 0 360 arc closepath 4 -1 roll add 360 0 arcn closepath fill }" + " bind def\n"); + } + if (symbol->vector->hexagons) { + fprintf(feps, "/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def\n"); + } fprintf(feps, "/TB { 2 copy } bind def\n"); - fprintf(feps, "/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def\n"); + fprintf(feps, "/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill }" + " bind def\n"); fprintf(feps, "/TE { pop pop } bind def\n"); fprintf(feps, "newpath\n"); @@ -405,8 +425,8 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) { previous_diameter = radius = 0.0f; circle = symbol->vector->circles; while (circle) { - if (previous_diameter != circle->diameter) { - previous_diameter = circle->diameter; + if (previous_diameter != circle->diameter - circle->width) { + previous_diameter = circle->diameter - circle->width; radius = (float) (0.5 * previous_diameter); } if (circle->colour) { @@ -417,7 +437,12 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) { fprintf(feps, "%.2f %.2f %.2f %.2f setcmykcolor\n", cyan_paper, magenta_paper, yellow_paper, black_paper); } - fprintf(feps, "%.2f %.2f %.2f TD\n", circle->x, (symbol->vector->height - circle->y), radius); + if (circle->width) { + fprintf(feps, "%.2f %.2f %.3f %.3f TC\n", + circle->x, (symbol->vector->height - circle->y), radius, circle->width); + } else { + fprintf(feps, "%.2f %.2f %.2f TD\n", circle->x, (symbol->vector->height - circle->y), radius); + } if (circle->next) { if ((symbol->output_options & CMYK_COLOUR) == 0) { fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink); @@ -427,7 +452,12 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) { } } else { // A 'black' circle - fprintf(feps, "%.2f %.2f %.2f TD\n", circle->x, (symbol->vector->height - circle->y), radius); + if (circle->width) { + fprintf(feps, "%.2f %.2f %.3f %.3f TC\n", + circle->x, (symbol->vector->height - circle->y), radius, circle->width); + } else { + fprintf(feps, "%.2f %.2f %.2f TD\n", circle->x, (symbol->vector->height - circle->y), radius); + } } circle = circle->next; } diff --git a/backend/qr.c b/backend/qr.c index 2535fe58..89a4dfa6 100644 --- a/backend/qr.c +++ b/backend/qr.c @@ -2998,7 +2998,8 @@ INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length autosize = 31; best_footprint = rmqr_height[31] * rmqr_width[31]; for (version = 30; version >= 0; version--) { - est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, gs1, symbol->eci, debug_print); + est_binlen = getBinaryLength(RMQR_VERSION + version, mode, jisdata, length, gs1, symbol->eci, + debug_print); footprint = rmqr_height[version] * rmqr_width[version]; if (ecc_level == LEVEL_M) { if (8 * rmqr_data_codewords_M[version] >= est_binlen) { @@ -3081,8 +3082,8 @@ INTERNAL int rmqr(struct zint_symbol *symbol, unsigned char source[], int length fullstream = (unsigned char *) _alloca(rmqr_total_codewords[version] + 1); #endif - qr_binary(datastream, RMQR_VERSION + version, target_codewords, mode, jisdata, length, gs1, symbol->eci, est_binlen, - debug_print); + qr_binary(datastream, RMQR_VERSION + version, target_codewords, mode, jisdata, length, gs1, symbol->eci, + est_binlen, debug_print); #ifdef ZINT_TEST if (symbol->debug & ZINT_DEBUG_TEST) debug_test_codeword_dump(symbol, datastream, target_codewords); #endif diff --git a/backend/svg.c b/backend/svg.c index 5953c45c..5df16051 100644 --- a/backend/svg.c +++ b/backend/svg.c @@ -288,15 +288,23 @@ INTERNAL int svg_plot(struct zint_symbol *symbol) { previous_diameter = circle->diameter; radius = (float) (0.5 * previous_diameter); } - fprintf(fsvg, " x, circle->y, radius); + fprintf(fsvg, " x, circle->y, circle->width ? 3 : 2, radius); if (circle->colour) { - fprintf(fsvg, " fill=\"#%s\"", bgcolour_string); + if (circle->width) { + fprintf(fsvg, " stroke=\"#%s\" stroke-width=\"%.3f\" fill=\"none\"", bgcolour_string, circle->width); + } else { + fprintf(fsvg, " fill=\"#%s\"", bgcolour_string); + } if (bg_alpha != 0xff) { // This doesn't work how the user is likely to expect - more work needed! fprintf(fsvg, " opacity=\"%.3f\"", bg_alpha_opacity); } } else { + if (circle->width) { + fprintf(fsvg, " stroke=\"#%s\" stroke-width=\"%.3f\" fill=\"none\"", fgcolour_string, circle->width); + } if (fg_alpha != 0xff) { fprintf(fsvg, " opacity=\"%.3f\"", fg_alpha_opacity); } diff --git a/backend/tests/data/eps/code128_egrave_bold.eps b/backend/tests/data/eps/code128_egrave_bold.eps index bc068f2d..07547cc0 100644 --- a/backend/tests/data/eps/code128_egrave_bold.eps +++ b/backend/tests/data/eps/code128_egrave_bold.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 224 119 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/code128_egrave_bold_rotate_90.eps b/backend/tests/data/eps/code128_egrave_bold_rotate_90.eps index 6d59260a..d4075600 100644 --- a/backend/tests/data/eps/code128_egrave_bold_rotate_90.eps +++ b/backend/tests/data/eps/code128_egrave_bold_rotate_90.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 119 224 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/code128_escape_latin1.eps b/backend/tests/data/eps/code128_escape_latin1.eps index 7cf28451..3e440eb8 100644 --- a/backend/tests/data/eps/code128_escape_latin1.eps +++ b/backend/tests/data/eps/code128_escape_latin1.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 246 119 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/code39_fg_bg.eps b/backend/tests/data/eps/code39_fg_bg.eps index 89f6cd31..d8cc74fa 100644 --- a/backend/tests/data/eps/code39_fg_bg.eps +++ b/backend/tests/data/eps/code39_fg_bg.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 128 119 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/code39_fgalpha_bg_cmyk.eps b/backend/tests/data/eps/code39_fgalpha_bg_cmyk.eps index ed4fbeda..dab98756 100644 --- a/backend/tests/data/eps/code39_fgalpha_bg_cmyk.eps +++ b/backend/tests/data/eps/code39_fgalpha_bg_cmyk.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 128 119 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dbar_ltd_24724_fig7_bold.eps b/backend/tests/data/eps/dbar_ltd_24724_fig7_bold.eps index 86be5e40..906607cf 100644 --- a/backend/tests/data/eps/dbar_ltd_24724_fig7_bold.eps +++ b/backend/tests/data/eps/dbar_ltd_24724_fig7_bold.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 158 119 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_1.0.eps b/backend/tests/data/eps/dotcode_1.0.eps index 96eac8b1..083f23e3 100644 --- a/backend/tests/data/eps/dotcode_1.0.eps +++ b/backend/tests/data/eps/dotcode_1.0.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 22 16 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_1.0_ds0.1.eps b/backend/tests/data/eps/dotcode_1.0_ds0.1.eps index 3e501953..b3320ec2 100644 --- a/backend/tests/data/eps/dotcode_1.0_ds0.1.eps +++ b/backend/tests/data/eps/dotcode_1.0_ds0.1.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 22 16 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_1.0_ds1.1.eps b/backend/tests/data/eps/dotcode_1.0_ds1.1.eps index 428fc2f8..6a0267f2 100644 --- a/backend/tests/data/eps/dotcode_1.0_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_1.0_ds1.1.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 23 17 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_1.5.eps b/backend/tests/data/eps/dotcode_1.5.eps index 33adeb32..8f79909a 100644 --- a/backend/tests/data/eps/dotcode_1.5.eps +++ b/backend/tests/data/eps/dotcode_1.5.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 33 24 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_1.5_ds0.4.eps b/backend/tests/data/eps/dotcode_1.5_ds0.4.eps index 7e7668fd..9f29e27f 100644 --- a/backend/tests/data/eps/dotcode_1.5_ds0.4.eps +++ b/backend/tests/data/eps/dotcode_1.5_ds0.4.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 33 24 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_1.5_ds1.1.eps b/backend/tests/data/eps/dotcode_1.5_ds1.1.eps index 048e954a..3b358e9f 100644 --- a/backend/tests/data/eps/dotcode_1.5_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_1.5_ds1.1.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 34 25 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_1.5_ds2.1.eps b/backend/tests/data/eps/dotcode_1.5_ds2.1.eps index 7a3c0e54..a012a163 100644 --- a/backend/tests/data/eps/dotcode_1.5_ds2.1.eps +++ b/backend/tests/data/eps/dotcode_1.5_ds2.1.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 37 28 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_2.0.eps b/backend/tests/data/eps/dotcode_2.0.eps index b3792d55..70401028 100644 --- a/backend/tests/data/eps/dotcode_2.0.eps +++ b/backend/tests/data/eps/dotcode_2.0.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 44 32 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_2.0_ds0.9.eps b/backend/tests/data/eps/dotcode_2.0_ds0.9.eps index 5124bcaf..712e1c0f 100644 --- a/backend/tests/data/eps/dotcode_2.0_ds0.9.eps +++ b/backend/tests/data/eps/dotcode_2.0_ds0.9.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 44 32 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_2.0_ds1.1.eps b/backend/tests/data/eps/dotcode_2.0_ds1.1.eps index 0a640d68..545d2fc5 100644 --- a/backend/tests/data/eps/dotcode_2.0_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_2.0_ds1.1.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 45 33 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_3.0.eps b/backend/tests/data/eps/dotcode_3.0.eps index 8c3a9d73..fa3c1ceb 100644 --- a/backend/tests/data/eps/dotcode_3.0.eps +++ b/backend/tests/data/eps/dotcode_3.0.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 66 48 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_3.0_ds0.4.eps b/backend/tests/data/eps/dotcode_3.0_ds0.4.eps index 760c1380..ea5f2ab6 100644 --- a/backend/tests/data/eps/dotcode_3.0_ds0.4.eps +++ b/backend/tests/data/eps/dotcode_3.0_ds0.4.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 66 48 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_3.0_ds1.1.eps b/backend/tests/data/eps/dotcode_3.0_ds1.1.eps index 4f0fc43e..2d516c16 100644 --- a/backend/tests/data/eps/dotcode_3.0_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_3.0_ds1.1.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 68 50 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_3.5.eps b/backend/tests/data/eps/dotcode_3.5.eps index 6ada2860..72edcfed 100644 --- a/backend/tests/data/eps/dotcode_3.5.eps +++ b/backend/tests/data/eps/dotcode_3.5.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 77 56 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_3.5_ds0.4.eps b/backend/tests/data/eps/dotcode_3.5_ds0.4.eps index d0a42f49..808814b7 100644 --- a/backend/tests/data/eps/dotcode_3.5_ds0.4.eps +++ b/backend/tests/data/eps/dotcode_3.5_ds0.4.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 77 56 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_3.5_ds1.1.eps b/backend/tests/data/eps/dotcode_3.5_ds1.1.eps index e5a9ac2d..700b15e8 100644 --- a/backend/tests/data/eps/dotcode_3.5_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_3.5_ds1.1.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 79 58 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_5.0.eps b/backend/tests/data/eps/dotcode_5.0.eps index e9047e04..efd5900d 100644 --- a/backend/tests/data/eps/dotcode_5.0.eps +++ b/backend/tests/data/eps/dotcode_5.0.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 110 80 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_5.0_ds0.2.eps b/backend/tests/data/eps/dotcode_5.0_ds0.2.eps index 8e9f9286..fbab69dc 100644 --- a/backend/tests/data/eps/dotcode_5.0_ds0.2.eps +++ b/backend/tests/data/eps/dotcode_5.0_ds0.2.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 110 80 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_5.0_ds1.1.eps b/backend/tests/data/eps/dotcode_5.0_ds1.1.eps index bb998931..255a63ca 100644 --- a/backend/tests/data/eps/dotcode_5.0_ds1.1.eps +++ b/backend/tests/data/eps/dotcode_5.0_ds1.1.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 112 82 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_5.0_ds1.7.eps b/backend/tests/data/eps/dotcode_5.0_ds1.7.eps index 661db552..2efe00a0 100644 --- a/backend/tests/data/eps/dotcode_5.0_ds1.7.eps +++ b/backend/tests/data/eps/dotcode_5.0_ds1.7.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 118 88 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/dotcode_no_bg.eps b/backend/tests/data/eps/dotcode_no_bg.eps index 87ec0e98..a8ba4713 100644 --- a/backend/tests/data/eps/dotcode_no_bg.eps +++ b/backend/tests/data/eps/dotcode_no_bg.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 22 16 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/ean13_2addon_ggs_5.2.2.5.1-2.eps b/backend/tests/data/eps/ean13_2addon_ggs_5.2.2.5.1-2.eps index 6d12ac6e..895af35d 100644 --- a/backend/tests/data/eps/ean13_2addon_ggs_5.2.2.5.1-2.eps +++ b/backend/tests/data/eps/ean13_2addon_ggs_5.2.2.5.1-2.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 276 117 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/maxicode_no_bg_hwsp3_rotate_180.eps b/backend/tests/data/eps/maxicode_no_bg_hwsp3_rotate_180.eps index 2dad2ac6..fafda1b8 100644 --- a/backend/tests/data/eps/maxicode_no_bg_hwsp3_rotate_180.eps +++ b/backend/tests/data/eps/maxicode_no_bg_hwsp3_rotate_180.eps @@ -1,11 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 72 58 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def +/TC { newpath 4 1 roll 3 copy 0 360 arc closepath 4 -1 roll add 360 0 arcn closepath fill } bind def /TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def @@ -366,14 +365,6 @@ newpath 21.00 57.58 21.87 57.08 21.87 56.08 21.00 55.58 20.13 56.08 20.13 57.08 TH 15.00 57.58 15.87 57.08 15.87 56.08 15.00 55.58 14.13 56.08 14.13 57.08 TH 11.00 57.58 11.87 57.08 11.87 56.08 11.00 55.58 10.13 56.08 10.13 57.08 TH -37.00 28.87 9.00 TD -0.00 0.00 1.00 setrgbcolor -37.00 28.87 7.43 TD -0.00 0.00 0.00 setrgbcolor -37.00 28.87 5.86 TD -0.00 0.00 1.00 setrgbcolor -37.00 28.87 4.29 TD -0.00 0.00 0.00 setrgbcolor -37.00 28.87 2.72 TD -0.00 0.00 1.00 setrgbcolor -37.00 28.87 1.15 TD +37.00 28.87 7.431 1.569 TC +37.00 28.87 4.293 1.569 TC +37.00 28.87 1.155 1.569 TC diff --git a/backend/tests/data/eps/maxicode_rotate_270_cmyk.eps b/backend/tests/data/eps/maxicode_rotate_270_cmyk.eps index e6273cd2..ba2c0132 100644 --- a/backend/tests/data/eps/maxicode_rotate_270_cmyk.eps +++ b/backend/tests/data/eps/maxicode_rotate_270_cmyk.eps @@ -1,11 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 58 60 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def +/TC { newpath 4 1 roll 3 copy 0 360 arc closepath 4 -1 roll add 360 0 arcn closepath fill } bind def /TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def @@ -369,14 +368,6 @@ TE 55.58 45.00 56.08 45.87 57.08 45.87 57.58 45.00 57.08 44.13 56.08 44.13 TH 55.58 51.00 56.08 51.87 57.08 51.87 57.58 51.00 57.08 50.13 56.08 50.13 TH 55.58 55.00 56.08 55.87 57.08 55.87 57.58 55.00 57.08 54.13 56.08 54.13 TH -28.87 29.00 9.00 TD -0.00 0.00 0.00 0.00 setcmykcolor -28.87 29.00 7.43 TD -0.00 0.00 0.00 1.00 setcmykcolor -28.87 29.00 5.86 TD -0.00 0.00 0.00 0.00 setcmykcolor -28.87 29.00 4.29 TD -0.00 0.00 0.00 1.00 setcmykcolor -28.87 29.00 2.72 TD -0.00 0.00 0.00 0.00 setcmykcolor -28.87 29.00 1.15 TD +28.87 29.00 7.431 1.569 TC +28.87 29.00 4.293 1.569 TC +28.87 29.00 1.155 1.569 TC diff --git a/backend/tests/data/eps/ultra_fg_bg.eps b/backend/tests/data/eps/ultra_fg_bg.eps index d6ad740b..9eeceb73 100644 --- a/backend/tests/data/eps/ultra_fg_bg.eps +++ b/backend/tests/data/eps/ultra_fg_bg.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 28 26 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/ultra_fg_bg_box.eps b/backend/tests/data/eps/ultra_fg_bg_box.eps index 7dcdfad0..6cd9a151 100644 --- a/backend/tests/data/eps/ultra_fg_bg_box.eps +++ b/backend/tests/data/eps/ultra_fg_bg_box.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 40 30 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/ultra_fg_bg_box_cmyk.eps b/backend/tests/data/eps/ultra_fg_bg_box_cmyk.eps index a945596e..f2c5ead8 100644 --- a/backend/tests/data/eps/ultra_fg_bg_box_cmyk.eps +++ b/backend/tests/data/eps/ultra_fg_bg_box_cmyk.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 40 38 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5.eps b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5.eps index 926272d4..b2d1be99 100644 --- a/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5.eps +++ b/backend/tests/data/eps/upca_2addon_ggs_5.2.6.6-5.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 276 117 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/upce_5addon.eps b/backend/tests/data/eps/upce_5addon.eps index 005bfd45..79cc76b1 100644 --- a/backend/tests/data/eps/upce_5addon.eps +++ b/backend/tests/data/eps/upce_5addon.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 238 117 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/eps/upce_5addon_small_bold.eps b/backend/tests/data/eps/upce_5addon_small_bold.eps index 5ab0d2da..5cde3c39 100644 --- a/backend/tests/data/eps/upce_5addon_small_bold.eps +++ b/backend/tests/data/eps/upce_5addon_small_bold.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 238 112 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/print/eps/code128_aim.eps b/backend/tests/data/print/eps/code128_aim.eps index b97fb02f..c44fc38b 100644 --- a/backend/tests/data/print/eps/code128_aim.eps +++ b/backend/tests/data/print/eps/code128_aim.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 136 119 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/print/eps/dotcode_aim_fig7.eps b/backend/tests/data/print/eps/dotcode_aim_fig7.eps index 43dbc88e..7c277543 100644 --- a/backend/tests/data/print/eps/dotcode_aim_fig7.eps +++ b/backend/tests/data/print/eps/dotcode_aim_fig7.eps @@ -1,12 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 130 100 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def /TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/print/eps/maxicode_fig_2.eps b/backend/tests/data/print/eps/maxicode_fig_2.eps index f720f1bb..d8d92e6e 100644 --- a/backend/tests/data/print/eps/maxicode_fig_2.eps +++ b/backend/tests/data/print/eps/maxicode_fig_2.eps @@ -1,11 +1,10 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 60 58 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def +/TC { newpath 4 1 roll 3 copy 0 360 arc closepath 4 -1 roll add 360 0 arcn closepath fill } bind def /TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def @@ -363,14 +362,6 @@ TE 37.00 2.15 37.87 1.65 37.87 0.65 37.00 0.15 36.13 0.65 36.13 1.65 TH 43.00 2.15 43.87 1.65 43.87 0.65 43.00 0.15 42.13 0.65 42.13 1.65 TH 53.00 2.15 53.87 1.65 53.87 0.65 53.00 0.15 52.13 0.65 52.13 1.65 TH -29.00 28.87 9.00 TD -1.00 1.00 1.00 setrgbcolor -29.00 28.87 7.43 TD -0.00 0.00 0.00 setrgbcolor -29.00 28.87 5.86 TD -1.00 1.00 1.00 setrgbcolor -29.00 28.87 4.29 TD -0.00 0.00 0.00 setrgbcolor -29.00 28.87 2.72 TD -1.00 1.00 1.00 setrgbcolor -29.00 28.87 1.15 TD +29.00 28.87 7.431 1.569 TC +29.00 28.87 4.293 1.569 TC +29.00 28.87 1.155 1.569 TC diff --git a/backend/tests/data/print/eps/qr_v1_m.eps b/backend/tests/data/print/eps/qr_v1_m.eps index 07313119..14659a19 100644 --- a/backend/tests/data/print/eps/qr_v1_m.eps +++ b/backend/tests/data/print/eps/qr_v1_m.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 42 42 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/print/eps/ultracode_a.eps b/backend/tests/data/print/eps/ultracode_a.eps index 96b1a147..c9351990 100644 --- a/backend/tests/data/print/eps/ultracode_a.eps +++ b/backend/tests/data/print/eps/ultracode_a.eps @@ -1,12 +1,9 @@ %!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Zint 2.9.1.9 +%%Creator: Zint 2.10.0.9 %%Title: Zint Generated Symbol %%Pages: 0 %%BoundingBox: 0 0 26 26 %%EndComments -/TL { setlinewidth moveto lineto stroke } bind def -/TD { newpath 0 360 arc fill } bind def -/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def /TB { 2 copy } bind def /TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def /TE { pop pop } bind def diff --git a/backend/tests/data/print/svg/maxicode_fig_2.svg b/backend/tests/data/print/svg/maxicode_fig_2.svg index 631f8dcb..f8cf54be 100644 --- a/backend/tests/data/print/svg/maxicode_fig_2.svg +++ b/backend/tests/data/print/svg/maxicode_fig_2.svg @@ -356,11 +356,8 @@ - - - - - - + + + diff --git a/backend/tests/data/svg/maxicode_box2.svg b/backend/tests/data/svg/maxicode_box2.svg index 9fcad603..67911de3 100644 --- a/backend/tests/data/svg/maxicode_box2.svg +++ b/backend/tests/data/svg/maxicode_box2.svg @@ -374,11 +374,8 @@ - - - - - - + + + diff --git a/backend/tests/data/svg/maxicode_fgbg_rotate_90.svg b/backend/tests/data/svg/maxicode_fgbg_rotate_90.svg index 350f363a..8e5b07e9 100644 --- a/backend/tests/data/svg/maxicode_fgbg_rotate_90.svg +++ b/backend/tests/data/svg/maxicode_fgbg_rotate_90.svg @@ -370,11 +370,8 @@ - - - - - - + + + diff --git a/backend/tests/data/svg/maxicode_vwsp1_bind1.svg b/backend/tests/data/svg/maxicode_vwsp1_bind1.svg index 232db3dd..6aaf1974 100644 --- a/backend/tests/data/svg/maxicode_vwsp1_bind1.svg +++ b/backend/tests/data/svg/maxicode_vwsp1_bind1.svg @@ -372,11 +372,8 @@ - - - - - - + + + diff --git a/backend/vector.c b/backend/vector.c index 1c064859..f9c7c9fa 100644 --- a/backend/vector.c +++ b/backend/vector.c @@ -99,7 +99,8 @@ static int vector_plot_add_hexagon(struct zint_symbol *symbol, struct zint_vecto return 1; } -static struct zint_vector_circle *vector_plot_create_circle(float x, float y, float diameter, int colour) { +static struct zint_vector_circle *vector_plot_create_circle(float x, float y, float diameter, float width, + int colour) { struct zint_vector_circle *circle; circle = (struct zint_vector_circle *) malloc(sizeof(struct zint_vector_circle)); @@ -108,6 +109,7 @@ static struct zint_vector_circle *vector_plot_create_circle(float x, float y, fl circle->x = x; circle->y = y; circle->diameter = diameter; + circle->width = width; circle->colour = colour; return circle; @@ -236,6 +238,7 @@ static void vector_scale(struct zint_symbol *symbol, int file_type) { circle->x *= scale; circle->y *= scale; circle->diameter *= scale; + circle->width *= scale; circle = circle->next; } @@ -490,7 +493,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_ // Plot Maxicode symbols if (symbol->symbology == BARCODE_MAXICODE) { struct zint_vector_circle *circle; - float bull_x, bull_y, bull_d_incr; + float bull_x, bull_y, bull_d_incr, bull_width; const float two_div_sqrt3 = 1.1547f; /* 2 / √3 */ const float sqrt3_div_two = 0.866f; /* √3 / 2 == 1.5 / √3 */ @@ -510,19 +513,15 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_ bull_y = vector->height / 2.0f; /* 16Y above bottom-most centre = halfway */ /* Total finder diameter is 9X, so diametric increment for 5 diameters d2 to d6 is (9X - d1) / 5 */ bull_d_incr = (hex_diameter * 9 - hex_ydiameter) / 5.0f; + bull_width = bull_d_incr / 2.0f; - // TODO: Add width to circle so can draw rings instead of overlaying circles - circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter + bull_d_incr * 5, 0); + circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter + bull_d_incr * 5 - bull_width, bull_width, + 0); vector_plot_add_circle(symbol, circle, &last_circle); - circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter + bull_d_incr * 4, 1); + circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter + bull_d_incr * 3 - bull_width, bull_width, + 0); vector_plot_add_circle(symbol, circle, &last_circle); - circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter + bull_d_incr * 3, 0); - vector_plot_add_circle(symbol, circle, &last_circle); - circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter + bull_d_incr * 2, 1); - vector_plot_add_circle(symbol, circle, &last_circle); - circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter + bull_d_incr, 0); - vector_plot_add_circle(symbol, circle, &last_circle); - circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter, 1); + circle = vector_plot_create_circle(bull_x, bull_y, hex_ydiameter + bull_d_incr - bull_width, bull_width, 0); vector_plot_add_circle(symbol, circle, &last_circle); /* Hexagons */ @@ -546,7 +545,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_ struct zint_vector_circle *circle = vector_plot_create_circle( i + dot_offset + xoffset, r + dot_offset + yoffset, - symbol->dot_size, 0); + symbol->dot_size, 0, 0); vector_plot_add_circle(symbol, circle, &last_circle); } } diff --git a/backend/zint.h b/backend/zint.h index 3ba8b62b..a9435741 100644 --- a/backend/zint.h +++ b/backend/zint.h @@ -54,7 +54,8 @@ extern "C" { }; struct zint_vector_string { - float x, y, fsize; /* x, y position relative to halign; font size */ + float x, y; /* x, y position relative to halign */ + float fsize; /* Font size */ float width; /* Suggested string width, may be 0 if none recommended */ int length; /* Number of characters */ int rotation; /* 0, 90, 180, 270 degrees */ @@ -64,7 +65,9 @@ extern "C" { }; struct zint_vector_circle { - float x, y, diameter; + float x, y; + float diameter; /* Circle diameter. Does not include width (if any) */ + float width; /* Width of circle perimeter. 0 for fill (disc) */ int colour; /* Non-zero for draw with background colour */ struct zint_vector_circle *next; /* Pointer to next circle */ }; diff --git a/backend_qt/qzint.cpp b/backend_qt/qzint.cpp index a5d07a35..06328b7b 100644 --- a/backend_qt/qzint.cpp +++ b/backend_qt/qzint.cpp @@ -567,14 +567,14 @@ namespace Zint { } if (circle->colour) { // Set means use background colour p.setColor(m_bgColor); - p.setWidth(0); + p.setWidthF(circle->width); painter.setPen(p); - painter.setBrush(bgBrush); + painter.setBrush(circle->width ? Qt::NoBrush : bgBrush); } else { p.setColor(m_fgColor); - p.setWidth(0); + p.setWidthF(circle->width); painter.setPen(p); - painter.setBrush(fgBrush); + painter.setBrush(circle->width ? Qt::NoBrush : bgBrush); } painter.drawEllipse(QPointF(circle->x, circle->y), radius, radius); circle = circle->next; diff --git a/docs/manual.txt b/docs/manual.txt index 314f08c9..6cabb1fb 100644 --- a/docs/manual.txt +++ b/docs/manual.txt @@ -1019,20 +1019,21 @@ while (rect) { hexagon = symbol->vector->hexagons; while (hexagon) { - draw_hexagon(hexagon->x, hexagon->y, hexagon->diameter, hexagon->rotation): + draw_hexagon(hexagon->x, hexagon->y, hexagon->diameter, hexagon->rotation); hexagon = hexagon->next; } string = symbol->vector->strings; while (string) { draw_string(string->x, string->y, string->fsize, string->rotation, - string->halign, string->text, string->length): + string->halign, string->text, string->length); string = string->next; } circle = symbol->vector->circles; while (circle) { - draw_circle(circle->x, circle->y, circle->diameter, circle->colour): + draw_circle(circle->x, circle->y, circle->diameter, circle->width, + circle->colour); circle = circle->next; }