[cairo-commit] cairo/src cairo-fixed.c,1.11,1.12

Carl Worth commit at pdx.freedesktop.org
Sat Aug 20 07:37:45 EST 2005


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv1327/src

Modified Files:
	cairo-fixed.c 
Log Message:

2005-08-19  Carl Worth  <cworth at cworth.org>

        Fix for bug #4137:

        * src/cairo-fixed.c: (_cairo_fixed_from_double): Fix to round
        properly.


Index: cairo-fixed.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-fixed.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- cairo-fixed.c	18 Aug 2005 16:46:20 -0000	1.11
+++ cairo-fixed.c	19 Aug 2005 21:37:43 -0000	1.12
@@ -45,7 +45,7 @@
 cairo_fixed_t
 _cairo_fixed_from_double (double d)
 {
-    return (cairo_fixed_t) (d * 65536);
+    return (cairo_fixed_t) floor (d * 65536 + 0.5);
 }
 
 cairo_fixed_t



More information about the cairo-commit mailing list