[dia] svg: fix <tspan/> roundtrip (it's position is not relative to >text/>



commit 8fe43e27bb021e492e6ec33b10ccc678da1b1462
Author: Hans Breuer <hans breuer org>
Date:   Sun Aug 18 15:41:48 2013 +0200

    svg: fix <tspan/> roundtrip (it's position is not relative to >text/>
    
    Checked with with iDraw and Firefox to import Dia's render-test.svg.

 plug-ins/svg/svg-import.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/svg/svg-import.c b/plug-ins/svg/svg-import.c
index d092d75..e57b6a4 100644
--- a/plug-ins/svg/svg-import.c
+++ b/plug-ins/svg/svg-import.c
@@ -657,8 +657,8 @@ read_text_svg(xmlNodePtr node, DiaSvgStyle *parent_style, GHashTable *style_ht,
            g_string_append(paragraph, "\n");
          } else { /* only first time - with bogus, experimental division of user scale */
            dia_svg_parse_style(tspan, gs, matrix ? user_scale / matrix->yy : user_scale);
-           point.x += _node_get_real (tspan, "x", 0.0);
-           point.y += _node_get_real (tspan, "y", 0.0);
+           point.x = _node_get_real (tspan, "x", point.x);
+           point.y = _node_get_real (tspan, "y", point.y);
          }
           g_string_append(paragraph, (gchar*)line);
          xmlFree(line);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]