aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/Color.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/generic/Color.c b/generic/Color.c
index b5d1da6..33708c7 100644
--- a/generic/Color.c
+++ b/generic/Color.c
@@ -1240,6 +1240,16 @@ ZnGetGradient(Tcl_Interp *interp,
}
*scan_ptr = '\0';
}
+ else if ((scan_ptr = strchr(buffer, '['))) {
+ num_tok = sscanf(scan_ptr, "[%lf %lf", (double *) &x, (double *) &y);
+ if (num_tok == 2) {
+ type = ZN_PATH_GRADIENT;
+ }
+ else {
+ goto grad_err2;
+ }
+ *scan_ptr = '\0';
+ }
/*
* Next count the colors.
*/