Re: [AD] 4.0.2 release

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> The attached patch should fix this problem (negative hue was not
> treated in hsv_to_rgb(); apparantly it was introduced when a 'bug in
> the hue blender' was fixed six weeks ago).

Except that treating a negative hue was precisely the bug :-)
Specifically, -epsilon which should have been treated like 0.0-60.0 was
treated like 300.0-360.0, which was fooling the blender.

Now, according to the docs, hsv_to_rgb() isn't supposed to treat negative
hue values:
"void hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b);
void rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v);
Convert color values between the HSV and RGB colorspaces. The RGB values
range from 0 to 255, hue is from 0 to 360, and saturation and value are from
0 to 1."

So either we fix the hue blender and break an undocumented behaviour, or we
keep the bug in the hue blender and the undocumented behaviour. I still
think the former is the best solution.

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/