[cairo-commit] cairo/test text-rotate.c,1.9,1.10

Owen Taylor commit at pdx.freedesktop.org
Mon Aug 22 08:45:49 PDT 2005


Committed by: otaylor

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv24597/test

Modified Files:
	text-rotate.c 
Log Message:
2005-08-22  Owen Taylor  <otaylor at redhat.com>

        * test/text-rotate.c (draw): Use floor(0.5+x) rather than
        round(), which is C99. (David Hollenberg)


Index: text-rotate.c
===================================================================
RCS file: /cvs/cairo/cairo/test/text-rotate.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- text-rotate.c	6 May 2005 20:32:53 -0000	1.9
+++ text-rotate.c	22 Aug 2005 15:45:46 -0000	1.10
@@ -92,8 +92,8 @@
     if (NUM_TEXT == 1) {
 	x_off = y_off = 0;
     } else {
-	y_off = - round (extents.height / 2.0);
-	x_off = round ((extents.height+1) / (2 * tan (M_PI/NUM_TEXT)));
+	y_off = - floor (0.5 + extents.height / 2.0);
+	x_off = floor (0.5 + (extents.height+1) / (2 * tan (M_PI/NUM_TEXT)));
     }
   
     for (i=0; i < NUM_TEXT; i++) {



More information about the cairo-commit mailing list