From: erg Date: Thu, 15 Jul 2010 18:34:47 +0000 (+0000) Subject: Fix bug in color conversion; remove CMYK allow color types as we don't have X-Git-Tag: LAST_LIBGRAPH~32^2~1273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bba211303139f39bc07e171ce1a865fbea5eec2;p=graphviz Fix bug in color conversion; remove CMYK allow color types as we don't have a unique string format. --- diff --git a/cmd/gvpr/gvpr.1 b/cmd/gvpr/gvpr.1 index 55b4628b1..9ab0ffd35 100644 --- a/cmd/gvpr/gvpr.1 +++ b/cmd/gvpr/gvpr.1 @@ -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 diff --git a/lib/gvpr/actions.c b/lib/gvpr/actions.c index af0ed9155..7071e5efb 100644 --- a/lib/gvpr/actions.c +++ b/lib/gvpr/actions.c @@ -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",