gimp r26758 - in trunk: . app/core



Author: neo
Date: Mon Aug 25 13:20:07 2008
New Revision: 26758
URL: http://svn.gnome.org/viewvc/gimp?rev=26758&view=rev

Log:
2008-08-25  Sven Neumann  <sven gimp org>

	* app/core/gimpgradient.c (gimp_gradient_get_new_preview): fixed
	rounding errors in color conversion.



Modified:
   trunk/ChangeLog
   trunk/app/core/gimpgradient.c

Modified: trunk/app/core/gimpgradient.c
==============================================================================
--- trunk/app/core/gimpgradient.c	(original)
+++ trunk/app/core/gimpgradient.c	Mon Aug 25 13:20:07 2008
@@ -200,10 +200,10 @@
       seg = gimp_gradient_get_color_at (gradient, context, seg, cur_x,
                                         FALSE, &color);
 
-      *p++ = color.r * 255.0;
-      *p++ = color.g * 255.0;
-      *p++ = color.b * 255.0;
-      *p++ = color.a * 255.0;
+      *p++ = ROUND (color.r * 255.0);
+      *p++ = ROUND (color.g * 255.0);
+      *p++ = ROUND (color.b * 255.0);
+      *p++ = ROUND (color.a * 255.0);
 
       cur_x += dx;
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]