Index: lib/diasvgrenderer.c
===================================================================
RCS file: /cvs/gnome/dia/lib/diasvgrenderer.c,v
retrieving revision 1.10
diff -u -p -u -r1.10 diasvgrenderer.c
--- lib/diasvgrenderer.c	7 Apr 2005 19:57:36 -0000	1.10
+++ lib/diasvgrenderer.c	22 Jun 2006 19:31:35 -0000
@@ -48,8 +48,9 @@
 #include "diasvgrenderer.h"
 
 #define DTOSTR_BUF_SIZE G_ASCII_DTOSTR_BUF_SIZE
-#define dia_svg_dtostr(buf,d) \
-	g_ascii_formatd(buf,sizeof(buf),"%g",d)
+#define dia_svg_dtostr(buf,d)                                  \
+  g_ascii_formatd(buf,sizeof(buf),"%g",(d)*renderer->scale)
+#define SVG_FONT_SCALE_FACTOR 0.7
 
 /* DiaSvgRenderer methods */
 static void
@@ -267,6 +268,7 @@ draw_line(DiaRenderer *self, 
 
   xmlSetProp(node, "style", get_draw_style(renderer, line_colour));
 
+  printf("draw line: scale = %f\n", renderer->scale);
   dia_svg_dtostr(d_buf, start->x);
   xmlSetProp(node, "x1", d_buf);
   dia_svg_dtostr(d_buf, start->y);
@@ -667,7 +669,7 @@ draw_string(DiaRenderer *self,
     break;
   }
   tmp = g_strdup_printf("%s; font-size: %s", style,
-			dia_svg_dtostr(d_buf, self->font_height) );
+			dia_svg_dtostr(d_buf, self->font_height*SVG_FONT_SCALE_FACTOR) );
   g_free (style);
   style = tmp;
 
Index: lib/diasvgrenderer.h
===================================================================
RCS file: /cvs/gnome/dia/lib/diasvgrenderer.h,v
retrieving revision 1.3
diff -u -p -u -r1.3 diasvgrenderer.h
--- lib/diasvgrenderer.h	29 Nov 2003 18:05:30 -0000	1.3
+++ lib/diasvgrenderer.h	22 Jun 2006 19:31:35 -0000
@@ -30,6 +30,7 @@ struct _DiaSvgRenderer
   real dot_length;
 
   real linewidth;
+  real scale;  /* 100 for svg output, 1.0 for shape output */
   const char *linecap;
   const char *linejoin;
   char *linestyle; /* not const -- must free */
Index: plug-ins/shape/shape-export.c
===================================================================
RCS file: /cvs/gnome/dia/plug-ins/shape/shape-export.c,v
retrieving revision 1.31
diff -u -p -u -r1.31 shape-export.c
--- plug-ins/shape/shape-export.c	18 Jul 2005 18:53:29 -0000	1.31
+++ plug-ins/shape/shape-export.c	22 Jun 2006 19:31:39 -0000
@@ -145,6 +145,7 @@ new_shape_renderer(DiagramData *data, co
   renderer->dash_length = 1.0;
   renderer->dot_length = 0.2;
   renderer->saved_line_style = LINESTYLE_SOLID;
+  renderer->scale = 1.0;
 
   /* set up the root node */
   renderer->doc = xmlNewDoc("1.0");
cvs server: Diffing plug-ins/svg
Index: plug-ins/svg/render_svg.c
===================================================================
RCS file: /cvs/gnome/dia/plug-ins/svg/render_svg.c,v
retrieving revision 1.32
diff -u -p -u -r1.32 render_svg.c
--- plug-ins/svg/render_svg.c	22 Jan 2006 14:05:04 -0000	1.32
+++ plug-ins/svg/render_svg.c	22 Jun 2006 19:31:39 -0000
@@ -43,6 +43,9 @@
 #include "dia_xml_libxml.h"
 #include "object.h"
 
+/* Multiplication factor for dia units to svg units */
+#define D2S_SCALE 100
+
 G_BEGIN_DECLS
 
 #define SVG_TYPE_RENDERER           (svg_renderer_get_type ())
@@ -161,6 +164,7 @@ new_svg_renderer(DiagramData *data, cons
   renderer->dash_length = 1.0;
   renderer->dot_length = 0.2;
   renderer->saved_line_style = LINESTYLE_SOLID;
+  renderer->scale = D2S_SCALE;
 
   /* set up the root node */
   renderer->doc = xmlNewDoc("1.0");
@@ -182,9 +186,9 @@ new_svg_renderer(DiagramData *data, cons
 	     (int)ceil((extent->bottom - extent->top)));
   xmlSetProp(renderer->root, "height", buf);
   g_snprintf(buf, sizeof(buf), "%d %d %d %d",
-	     (int)floor(extent->left), (int)floor(extent->top),
-	     (int)ceil(extent->right - extent->left),
-	     (int)ceil(extent->bottom - extent->top));
+	     (int)floor(extent->left*D2S_SCALE), (int)floor(extent->top*D2S_SCALE),
+	     (int)ceil((extent->right - extent->left)*D2S_SCALE),
+	     (int)ceil((extent->bottom - extent->top)*D2S_SCALE));
   xmlSetProp(renderer->root, "viewBox", buf);
   
   time_now = time(NULL);
@@ -234,15 +238,15 @@ draw_rounded_rect(DiaRenderer *self, 
   xmlSetProp(node, "style", 
              DIA_SVG_RENDERER_GET_CLASS(self)->get_draw_style(renderer, colour));
 
-  g_ascii_formatd(buf, sizeof(buf), "%g", ul_corner->x);
+  g_ascii_formatd(buf, sizeof(buf), "%g", ul_corner->x*D2S_SCALE);
   xmlSetProp(node, "x", buf);
-  g_ascii_formatd(buf, sizeof(buf), "%g", ul_corner->y);
+  g_ascii_formatd(buf, sizeof(buf), "%g", ul_corner->y*D2S_SCALE);
   xmlSetProp(node, "y", buf);
-  g_ascii_formatd(buf, sizeof(buf), "%g", lr_corner->x - ul_corner->x);
+  g_ascii_formatd(buf, sizeof(buf), "%g", (lr_corner->x - ul_corner->x)*D2S_SCALE);
   xmlSetProp(node, "width", buf);
-  g_ascii_formatd(buf, sizeof(buf), "%g", lr_corner->y - ul_corner->y);
+  g_ascii_formatd(buf, sizeof(buf), "%g", (lr_corner->y - ul_corner->y)*D2S_SCALE);
   xmlSetProp(node, "height", buf);
-  g_ascii_formatd(buf, sizeof(buf),"%g", rounding);
+  g_ascii_formatd(buf, sizeof(buf),"%g", rounding*D2S_SCALE);
   xmlSetProp(node, "rx", buf);
   xmlSetProp(node, "ry", buf);
 }
@@ -261,13 +265,13 @@ fill_rounded_rect(DiaRenderer *self, 
   xmlSetProp(node, "style", 
              DIA_SVG_RENDERER_GET_CLASS(self)->get_fill_style(renderer, colour));
 
-  g_ascii_formatd(buf, sizeof(buf), "%g", ul_corner->x);
+  g_ascii_formatd(buf, sizeof(buf), "%g", ul_corner->x*D2S_SCALE);
   xmlSetProp(node, "x", buf);
-  g_ascii_formatd(buf, sizeof(buf), "%g", ul_corner->y);
+  g_ascii_formatd(buf, sizeof(buf), "%g", ul_corner->y*D2S_SCALE);
   xmlSetProp(node, "y", buf);
-  g_ascii_formatd(buf, sizeof(buf), "%g", lr_corner->x - ul_corner->x);
+  g_ascii_formatd(buf, sizeof(buf), "%g", (lr_corner->x - ul_corner->x)*D2S_SCALE);
   xmlSetProp(node, "width", buf);
-  g_ascii_formatd(buf, sizeof(buf), "%g", lr_corner->y - ul_corner->y);
+  g_ascii_formatd(buf, sizeof(buf), "%g", (lr_corner->y - ul_corner->y)*D2S_SCALE);
   xmlSetProp(node, "height", buf);
   g_ascii_formatd(buf, sizeof(buf),"%g", rounding);
   xmlSetProp(node, "rx", buf);
