[cairo] svg2png scale bug

Jason Dorje Short jdorje at users.sf.net
Sat Aug 13 08:27:52 PDT 2005


This patch fixes a stupid little bug in the latest svg2png 
command-line-argument changes.  This one I'll commit immediately.

In a related issue it might be good to have some test cases for svg2png.

-jason
-------------- next part --------------
Index: src/svg2png.c
===================================================================
RCS file: /cvs/cairo/svg2png/src/svg2png.c,v
retrieving revision 1.10
diff -p -u -r1.10 svg2png.c
--- src/svg2png.c	13 Aug 2005 07:41:22 -0000	1.10
+++ src/svg2png.c	13 Aug 2005 15:23:17 -0000
@@ -140,8 +140,8 @@ render_to_png (FILE *svg_file, FILE *png
 
     /* xscale, yscale, or scale <= 0 means no option */
     scale = args->scale > 0.0 ? args->scale : 1.0;
-    xscale = args->xscale > 0.0 ? args->xscale : args->scale;
-    yscale = args->yscale > 0.0 ? args->yscale : args->scale;
+    xscale = args->xscale > 0.0 ? args->xscale : scale;
+    yscale = args->yscale > 0.0 ? args->yscale : scale;
 
     if (args->width <= 0 && args->height <= 0) {
         /* Neither width or height are given.  This case is easy; we just


More information about the cairo mailing list