[cairo-commit] libsvg/src svg_transform.c, 1.11, 1.12 svgint.h, 1.44, 1.45

Carl Worth commit at pdx.freedesktop.org
Fri Jun 3 09:23:34 PDT 2005


Committed by: cworth

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

Modified Files:
	svg_transform.c svgint.h 
Log Message:

        * src/svgint.h:
        * src/svg_transform.c: (_svg_transform_multiply_into_left),
        (_svg_transform_multiply_into_right), (_svg_transform_multiply):
        Rework the argument order of _svg_transform_multiply to match what
        I came up with for cairo_matrix_multiply, (which I trust to have
        had more review). Also avoid use of new as a parameter name in
        header files.


Index: svg_transform.c
===================================================================
RCS file: /cvs/cairo/libsvg/src/svg_transform.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- svg_transform.c	11 Apr 2005 16:20:09 -0000	1.11
+++ svg_transform.c	3 Jun 2005 16:23:32 -0000	1.12
@@ -26,6 +26,11 @@
 
 #include "svgint.h"
 
+static svg_status_t
+_svg_transform_multiply (svg_transform_t	*result,
+			 const svg_transform_t	*t1,
+			 const svg_transform_t	*t2);
+
 static svg_transform_t SVG_TRANSFORM_IDENTITY = {
     {
 	{1, 0},
@@ -181,11 +186,11 @@
 _svg_transform_multiply_into_left (svg_transform_t *t1, const svg_transform_t *t2)
 {
     svg_status_t status;
-    svg_transform_t new;
+    svg_transform_t t1_new;
 
-    status = _svg_transform_multiply (t1, t2, &new);
+    status = _svg_transform_multiply (&t1_new, t1, t2);
 
-    *t1 = new;
+    *t1 = t1_new;
 
     return status;
 }
@@ -194,19 +199,19 @@
 _svg_transform_multiply_into_right (const svg_transform_t *t1, svg_transform_t *t2)
 {
     svg_status_t status;
-    svg_transform_t new;
+    svg_transform_t t2_new;
 
-    status = _svg_transform_multiply (t1, t2, &new);
+    status = _svg_transform_multiply (&t2_new, t1, t2);
 
-    *t2 = new;
+    *t2 = t2_new;
 
     return status;
 }
 
-svg_status_t
-_svg_transform_multiply (const svg_transform_t	*t1,
-			 const svg_transform_t	*t2,
-			 svg_transform_t	*new)
+static svg_status_t
+_svg_transform_multiply (svg_transform_t	*result,
+			 const svg_transform_t	*t1,
+			 const svg_transform_t	*t2)
 {
     int	    row, col, n;
     double  t;
@@ -220,7 +225,7 @@
 	    for (n = 0; n < 2; n++) {
 		t += t1->m[row][n] * t2->m[n][col];
 	    }
-	    new->m[row][col] = t;
+	    result->m[row][col] = t;
 	}
     }
 

Index: svgint.h
===================================================================
RCS file: /cvs/cairo/libsvg/src/svgint.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- svgint.h	11 Apr 2005 16:20:09 -0000	1.44
+++ svgint.h	3 Jun 2005 16:23:32 -0000	1.45
@@ -940,11 +940,6 @@
 _svg_transform_multiply_into_right (const svg_transform_t *t1, svg_transform_t *t2);
 
 svg_status_t
-_svg_transform_multiply (const svg_transform_t	*t1,
-			 const svg_transform_t	*t2,
-			 svg_transform_t	*new);
-
-svg_status_t
 _svg_transform_render (svg_transform_t		*transform,
 		       svg_render_engine_t	*engine,
 		       void			*closure);




More information about the cairo-commit mailing list