Force white squares (not same as bgcolour) in Ultracode

This commit is contained in:
Robin Stuart 2020-08-12 12:19:26 +01:00
parent 2153ed416c
commit 20f767c4b6
6 changed files with 22 additions and 19 deletions

View file

@ -43,9 +43,6 @@ void colour_to_pscolor(int option, int colour, char* output) {
if ((option & CMYK_COLOUR) == 0) {
// Use RGB colour space
switch(colour) {
case 0: // White
strcat(output, "1.00 1.00 1.00");
break;
case 1: // Cyan
strcat(output, "0.00 1.00 1.00");
break;
@ -64,6 +61,9 @@ void colour_to_pscolor(int option, int colour, char* output) {
case 6: // Green
strcat(output, "0.00 1.00 0.00");
break;
case 8: // White
strcat(output, "1.00 1.00 1.00");
break;
default: // Black
strcat(output, "0.00 0.00 0.00");
break;
@ -72,9 +72,6 @@ void colour_to_pscolor(int option, int colour, char* output) {
} else {
// Use CMYK colour space
switch(colour) {
case 0: // White
strcat(output, "0.00 0.00 0.00 0.00");
break;
case 1: // Cyan
strcat(output, "1.00 0.00 0.00 0.00");
break;
@ -93,6 +90,9 @@ void colour_to_pscolor(int option, int colour, char* output) {
case 6: // Green
strcat(output, "1.00 0.00 1.00 0.00");
break;
case 8: // White
strcat(output, "0.00 0.00 0.00 0.00");
break;
default: // Black
strcat(output, "0.00 0.00 0.00 1.00");
break;
@ -239,7 +239,7 @@ INTERNAL int ps_plot(struct zint_symbol *symbol) {
// Rectangles
if (symbol->symbology == BARCODE_ULTRA) {
for (colour_index = 0; colour_index <= 7; colour_index++) {
for (colour_index = 0; colour_index <= 8; colour_index++) {
colour_rect_counter = 0;
rect = symbol->vector->rectangles;
while (rect) {