aboutsummaryrefslogtreecommitdiff
path: root/generic/Color.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/Color.c')
-rw-r--r--generic/Color.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/generic/Color.c b/generic/Color.c
index 7958314..443a3e6 100644
--- a/generic/Color.c
+++ b/generic/Color.c
@@ -540,7 +540,9 @@ ZnGetColor(Tcl_Interp *interp,
if (XParseColor(dpy, colormap, name, &color) == 0) {
goto col_err;
}
+ /*printf("parsed color : %d %d %d\n", color.red, color.green, color.blue);*/
if (XAllocColor(dpy, colormap, &color) != 0) {
+ /*printf("alloced color : %d %d %d\n", color.red, color.green, color.blue);*/
DeleteStressedCmap(dpy, colormap);
}
else {
@@ -634,6 +636,13 @@ ZnGetColorByValue(Tk_Window tkwin,
tk_col->color.green = color->green;
tk_col->color.blue = color->blue;
if (XAllocColor(dpy, colormap, &tk_col->color) != 0) {
+ /*if (tk_col->color.red != color->red ||
+ tk_col->color.green != color->green ||
+ tk_col->color.blue != color->blue) {
+ printf("couleur allouée approximative %d %d %d --> %d %d %d\n",
+ tk_col->color.red, tk_col->color.green, tk_col->color.blue,
+ color->red, color->green, color->blue);
+ }*/
DeleteStressedCmap(dpy, colormap);
}
else {
@@ -968,7 +977,9 @@ RealizeColorGradient(ColorGradient *grad,
#if 1
else {
int red_range, green_range, blue_range;
-
+ /*printf("first color : %d %d %d, last color : %d %d %d\n",
+ first->red, first->green, first->blue,
+ last->red, last->green, last->blue);*/
red_range = (int) last->red - (int) first->red;
green_range = (int) last->green - (int) first->green;
blue_range = (int) last->blue - (int) first->blue;