aboutsummaryrefslogtreecommitdiff
path: root/generic/Color.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/Color.c')
-rw-r--r--generic/Color.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/Color.c b/generic/Color.c
index 851086f..9b5a71c 100644
--- a/generic/Color.c
+++ b/generic/Color.c
@@ -1305,11 +1305,11 @@ ZnGetGradient(Tcl_Interp *interp,
red_range = (int) last->rgb->red - (int) first->rgb->red;
green_range = (int) last->rgb->green - (int) first->rgb->green;
blue_range = (int) last->rgb->blue - (int) first->rgb->blue;
- color.red =(int) first->rgb->red + red_range*first->control/100;
- color.green = (int) first->rgb->green + green_range*first->control/100;
- color.blue = (int) first->rgb->blue + blue_range*first->control/100;
+ color.red =(int) first->rgb->red + red_range/2;
+ color.green = (int) first->rgb->green + green_range/2;
+ color.blue = (int) first->rgb->blue + blue_range/2;
first->mid_rgb = ZnGetColorByValue(tkwin, &color);
- first->mid_alpha = first->alpha + (last->alpha-first->alpha)*first->control/100;
+ first->mid_alpha = first->alpha + (last->alpha-first->alpha)/2;
}
grad->colors[grad->num_colors-1].mid_rgb = NULL;