mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Correct postscript plotting error
Report and fix by Matthieu LARIGALDIE
This commit is contained in:
parent
2faff4e76f
commit
6954497fc1
15
backend/ps.c
15
backend/ps.c
@ -47,7 +47,7 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
|
|||||||
int error_number = 0;
|
int error_number = 0;
|
||||||
float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy;
|
float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy;
|
||||||
float radius;
|
float radius;
|
||||||
|
|
||||||
struct zint_vector_rect *rect;
|
struct zint_vector_rect *rect;
|
||||||
struct zint_vector_hexagon *hex;
|
struct zint_vector_hexagon *hex;
|
||||||
struct zint_vector_circle *circle;
|
struct zint_vector_circle *circle;
|
||||||
@ -158,14 +158,15 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
|
|||||||
} else {
|
} else {
|
||||||
fprintf(feps, "%.2f %.2f %.2f %.2f setcmykcolor\n", cyan_ink, magenta_ink, yellow_ink, black_ink);
|
fprintf(feps, "%.2f %.2f %.2f %.2f setcmykcolor\n", cyan_ink, magenta_ink, yellow_ink, black_ink);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rectangles
|
// Rectangles
|
||||||
rect = symbol->vector->rectangles;
|
rect = symbol->vector->rectangles;
|
||||||
while (rect) {
|
while (rect) {
|
||||||
fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", rect->height, (symbol->vector->height - rect->y) - rect->height, rect->x, rect->width);
|
fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", rect->height, (symbol->vector->height - rect->y) - rect->height, rect->x, rect->width);
|
||||||
|
fprintf(feps, "TE\n");
|
||||||
rect = rect->next;
|
rect = rect->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hexagons
|
// Hexagons
|
||||||
hex = symbol->vector->hexagons;
|
hex = symbol->vector->hexagons;
|
||||||
while (hex) {
|
while (hex) {
|
||||||
@ -185,7 +186,7 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
|
|||||||
fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TH\n", ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy);
|
fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TH\n", ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy);
|
||||||
hex = hex->next;
|
hex = hex->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Circles
|
// Circles
|
||||||
circle = symbol->vector->circles;
|
circle = symbol->vector->circles;
|
||||||
while (circle) {
|
while (circle) {
|
||||||
@ -210,7 +211,7 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
|
|||||||
}
|
}
|
||||||
circle = circle->next;
|
circle = circle->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
string = symbol->vector->strings;
|
string = symbol->vector->strings;
|
||||||
while (string) {
|
while (string) {
|
||||||
@ -225,8 +226,8 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
|
|||||||
fprintf(feps, "setmatrix\n");
|
fprintf(feps, "setmatrix\n");
|
||||||
string = string->next;
|
string = string->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(feps, "\nshowpage\n");
|
//fprintf(feps, "\nshowpage\n");
|
||||||
|
|
||||||
if (symbol->output_options & BARCODE_STDOUT) {
|
if (symbol->output_options & BARCODE_STDOUT) {
|
||||||
fflush(feps);
|
fflush(feps);
|
||||||
|
Loading…
Reference in New Issue
Block a user