diff options
author | lecoanet | 2002-05-16 09:28:25 +0000 |
---|---|---|
committer | lecoanet | 2002-05-16 09:28:25 +0000 |
commit | 86aca9024949ede1b349e78f21e077679d25b04b (patch) | |
tree | 09882cc0e09d203078045b52c5247d1895b8a710 | |
parent | 6ab9929dece1eb265e2d7bfb4c361f7c2db48dfb (diff) | |
download | tkzinc-86aca9024949ede1b349e78f21e077679d25b04b.zip tkzinc-86aca9024949ede1b349e78f21e077679d25b04b.tar.gz tkzinc-86aca9024949ede1b349e78f21e077679d25b04b.tar.bz2 tkzinc-86aca9024949ede1b349e78f21e077679d25b04b.tar.xz |
Correction du calcul de la valeur interm�diaire entre deux couleurs/alphas,
ce bug rendait inactif le param�tre de tension des gradients.
-rw-r--r-- | generic/Color.c | 8 |
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; |