From 1b2a87246f65b54bc348c467fe23464faeb0295d Mon Sep 17 00:00:00 2001 From: johanengelen Date: Fri, 6 Jun 2008 23:47:18 +0000 Subject: [PATCH] for sppath, use 2geompath for svg_write: sp_svg_write_path(np->curve->get_pathvector() ); --- src/sp-path.cpp | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 81d05ebef..e16147b12 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -308,28 +308,18 @@ sp_path_write(SPObject *object, Inkscape::XML::Node *repr, guint flags) } if ( shape->curve != NULL ) { - NArtBpath const * abp = shape->curve->get_bpath(); - if (abp) { - gchar *str = sp_svg_write_path(abp); - repr->setAttribute("d", str); - g_free(str); - } else { - repr->setAttribute("d", ""); - } + gchar *str = sp_svg_write_path(shape->curve->get_pathvector()); + repr->setAttribute("d", str); + g_free(str); } else { repr->setAttribute("d", NULL); } SPPath *path = (SPPath *) object; if ( path->original_curve != NULL ) { - NArtBpath const * abp = path->original_curve->get_bpath(); - if (abp) { - gchar *str = sp_svg_write_path(abp); - repr->setAttribute("inkscape:original-d", str); - g_free(str); - } else { - repr->setAttribute("inkscape:original-d", ""); - } + gchar *str = sp_svg_write_path(path->original_curve->get_pathvector()); + repr->setAttribute("inkscape:original-d", str); + g_free(str); } else { repr->setAttribute("inkscape:original-d", NULL); } @@ -414,14 +404,9 @@ sp_path_update_patheffect(SPLPEItem *lpeitem, bool write) // could also do SP_OBJECT(shape)->updateRepr(); but only the d attribute needs updating. Inkscape::XML::Node *repr = SP_OBJECT_REPR(shape); if ( shape->curve != NULL ) { - NArtBpath const *abp = shape->curve->get_bpath(); - if (abp) { - gchar *str = sp_svg_write_path(abp); - repr->setAttribute("d", str); - g_free(str); - } else { - repr->setAttribute("d", ""); - } + gchar *str = sp_svg_write_path(shape->curve->get_pathvector()); + repr->setAttribute("d", str); + g_free(str); } else { repr->setAttribute("d", NULL); } -- 2.30.2