summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-06-06 23:47:18 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-06-06 23:47:18 +0000
commit555cec653d092afa0c515c4344fea174f10fc1a4 (patch)
tree36f28978078ac385479afe18334120928ec6a027 /src
parentfor spirals, use 2geompath for svg_write: sp_svg_write_path(np->curve->get_pa... (diff)
downloadinkscape-555cec653d092afa0c515c4344fea174f10fc1a4.tar.gz
inkscape-555cec653d092afa0c515c4344fea174f10fc1a4.zip
for sppath, use 2geompath for svg_write: sp_svg_write_path(np->curve->get_pathvector() );
(bzr r5845)
Diffstat (limited to 'src')
-rw-r--r--src/sp-path.cpp33
1 files 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);
}