mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-18 02:17:06 +00:00
Merge branch Ultra
This commit is contained in:
@@ -251,10 +251,9 @@ static void vector_reduce_rectangles(struct zint_symbol *symbol) {
|
||||
while (rect) {
|
||||
prev = rect;
|
||||
target = prev->next;
|
||||
|
||||
|
||||
while (target) {
|
||||
|
||||
if ((rect->x == target->x) && (rect->width == target->width) && ((rect->y + rect->height) == target->y)) {
|
||||
if ((rect->x == target->x) && (rect->width == target->width) && ((rect->y + rect->height) == target->y) && (rect->colour == target->colour)) {
|
||||
rect->height += target->height;
|
||||
prev->next = target->next;
|
||||
free(target);
|
||||
@@ -338,7 +337,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
|
||||
addon_text_posn = 0.0;
|
||||
rect_count = 0;
|
||||
last_row_start = 0;
|
||||
|
||||
|
||||
/*
|
||||
* Determine if there will be any addon texts and text height
|
||||
*/
|
||||
@@ -483,20 +482,18 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
|
||||
addon_text_posn = row_posn + 8.0f;
|
||||
addon_latch = 1;
|
||||
}
|
||||
if (latch == 1) {
|
||||
/* a bar */
|
||||
if (module_is_set(symbol, this_row, i)) {
|
||||
/* a bar or colour block */
|
||||
if (addon_latch == 0) {
|
||||
rectangle = vector_plot_create_rect((float)(i + xoffset), row_posn, (float)block_width, row_height);
|
||||
if (symbol->symbology == BARCODE_ULTRA) {
|
||||
rectangle->colour = module_is_set(symbol, this_row, i);
|
||||
}
|
||||
} else {
|
||||
rectangle = vector_plot_create_rect((float)(i + xoffset), row_posn + 10.0f, (float)block_width, row_height - 5.0f);
|
||||
}
|
||||
latch = 0;
|
||||
|
||||
vector_plot_add_rect(symbol, rectangle, &last_rectangle);
|
||||
rect_count++;
|
||||
} else {
|
||||
/* a space */
|
||||
latch = 1;
|
||||
}
|
||||
i += block_width;
|
||||
|
||||
@@ -529,7 +526,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
|
||||
for (i = 0; i < symbol->width; i++) {
|
||||
if (module_is_set(symbol, r, i)) {
|
||||
//struct zint_vector_hexagon *hexagon = vector_plot_create_hexagon(((i * 0.88) + ((r & 1) ? 1.76 : 1.32)), ((r * 0.76) + 0.76), symbol->dot_size);
|
||||
struct zint_vector_hexagon *hexagon = vector_plot_create_hexagon(((i * 1.23f) + 0.615f + ((r & 1) ? 0.615f : 0.0f)) + xoffset,
|
||||
struct zint_vector_hexagon *hexagon = vector_plot_create_hexagon(((i * 1.23f) + 0.615f + ((r & 1) ? 0.615f : 0.0f)) + xoffset,
|
||||
((r * 1.067f) + 0.715f) + yoffset, symbol->dot_size);
|
||||
vector_plot_add_hexagon(symbol, hexagon, &last_hexagon);
|
||||
}
|
||||
@@ -565,7 +562,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (upceanflag == 8) {
|
||||
i = 0;
|
||||
for (rect = symbol->vector->rectangles; rect != NULL; rect = rect->next) {
|
||||
@@ -582,7 +579,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (upceanflag == 12) {
|
||||
i = 0;
|
||||
for (rect = symbol->vector->rectangles; rect != NULL; rect = rect->next) {
|
||||
@@ -603,7 +600,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (upceanflag == 13) {
|
||||
i = 0;
|
||||
for (rect = symbol->vector->rectangles; rect != NULL; rect = rect->next) {
|
||||
@@ -620,7 +617,7 @@ INTERNAL int plot_vector(struct zint_symbol *symbol, int rotate_angle, int file_
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Add the text */
|
||||
|
||||
if (!hide_text) {
|
||||
|
||||
Reference in New Issue
Block a user