From 86aca9024949ede1b349e78f21e077679d25b04b Mon Sep 17 00:00:00 2001 From: lecoanet Date: Thu, 16 May 2002 09:28:25 +0000 Subject: Correction du calcul de la valeur interm�diaire entre deux couleurs/alphas, ce bug rendait inactif le param�tre de tension des gradients. --- generic/Color.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'generic/Color.c') 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; -- cgit v1.1