Re: [AD] 4.0.2 release

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


Eric Botcazou wrote:
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.

How about:

if (h < -epsilon)
  h += 6.0f;
else if (h >= -epsilon && h < 0.0f)
 h = 0.0f;

Note: Untested.



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