Fix bug in color conversion; remove CMYK allow color types as we don't have
authorerg <devnull@localhost>
Thu, 15 Jul 2010 18:34:47 +0000 (18:34 +0000)
committererg <devnull@localhost>
Thu, 15 Jul 2010 18:34:47 +0000 (18:34 +0000)
a unique string format.

cmd/gvpr/gvpr.1
lib/gvpr/actions.c

index 55b4628b17559075c377129918a28edc03acdb54..9ab0ffd35abd811ac0080382a95c9d7f0f477a35 100644 (file)
@@ -839,7 +839,7 @@ value is returned. \fBsrand\fP should be called before any calls to
 \fBcolorx\fP(\fIcolor\fP : \fBstring\fP, \fIfmt\fP : \fBstring\fP) : \fBstring\fP
 translates a color from one format to another. The \fIcolor\fP argument should be
 a color in one of the recognized string representations. The \fIfmt\fP value should
-be one of "RGB", "RGBA", "HSV", "HSVA", or "CMYK".
+be one of "RGB", "RGBA", "HSV", or "HSVA".
 An empty string is returned on error.
 .SH "BUILT\(hyIN VARIABLES"
 .PP
index af0ed9155a902673b6852d7ce641e24630ee8228..7071e5efbdcf8514ef7fa418d7d721655546e8d8 100644 (file)
@@ -1307,10 +1307,10 @@ char *colorx (Expr_t* ex, char* incolor, char* fmt, Sfio_t* fp)
 
     switch (type) {
     case HSVA_DOUBLE :
-       sfprintf (fp, ".03f .03f .03f", 
+       sfprintf (fp, "%.03f %.03f %.03f", 
            color.u.HSVA[0], color.u.HSVA[1], color.u.HSVA[2]);
        if (alpha)
-           sfprintf (fp, " .03f", color.u.HSVA[3]);
+           sfprintf (fp, " %.03f", color.u.HSVA[3]);
        break;
     case RGBA_BYTE :
        sfprintf (fp, "#%02x%02x%02x",