Kim Woelders wrote: > Kim Woelders wrote: >> Dariusz Knociński wrote: >>> Hi All, >>> I wrote new version of some procedures in Imlib2 library and attached >>> patches for that >>> mail. >>> >>> In file color-helpres procedures : >>> >>> void __imlib_rgb_to_hsv( int r, int g, int b, float *h, float *s, float *v >>> ); >>> void __imlib_hsv_to_rgb( float h, float s, float v, int *r, int *g, int >>> *b ); >>> >>> I have changed the range of parameters hue from 0-100 to 0-360, and >>> saturation and value >>> from 0-100 to 0-1. This is correct to last version of documentation on the >>> web page. >>> >>> In file grad.c procedures : >>> >>> void __imlib_MapRange( ImlibRange * rg, int len ) >>> void __imlib_MapHsvaRange( ImlibRange * rg, int len ) >>> >>> I have changed internal variable inc >>> from: >>> inc = ((ll - 1) << 16) / (len); >>> to: >>> inc = ((ll - 1) << 16) / (len-1); >>> This patch repair bug for small values of parameter len, for example from 2 >>> to 16. >>> >>> And I apply two small screenshots of application imlib2_colorspace befor >>> and after patch. >>> >> The patch applies/compiles cleanly and seems to fix the problem in >> imlib2_colorspace - haven't checked beyond that. >> I'll commit this if there are no objections and noone beats me to it :) >> > On second thought - This might break stuff that relies on the old > behavior. Maybe the documentation should be changed in stead? > > raster? > Ok'ed by raster - committed. You are of course welcome to address correctness/speed issues :)
I have corrected formatting and removed use of the register keyword, as it doesn't make sense to me to use it here when it isn't used anywhere else in imlib2 and I doubt it has any impact on performance (in this case, anyway). /Kim ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel