From: johanengelen Date: Fri, 6 Jun 2008 23:44:01 +0000 (+0000) Subject: for spirals, use 2geompath for svg_write: sp_svg_write_path(np->curve->get_pathvector... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f4069c803d7d8ada72cd299e37d69c4f5bd9f16d;p=inkscape.git for spirals, use 2geompath for svg_write: sp_svg_write_path(np->curve->get_pathvector() ); --- diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp index 7351ff61f..1d4723641 100644 --- a/src/sp-spiral.cpp +++ b/src/sp-spiral.cpp @@ -167,26 +167,21 @@ sp_spiral_write (SPObject *object, Inkscape::XML::Node *repr, guint flags) // make sure the curve is rebuilt with all up-to-date parameters sp_spiral_set_shape ((SPShape *) spiral); - //Duplicate the path - SPCurve *curve = ((SPShape *) spiral)->curve; - //Nulls might be possible if this called iteratively - if ( !curve ) { - //g_warning("sp_spiral_write(): No path to copy\n"); - return NULL; - } - NArtBpath const *bpath = SP_CURVE_BPATH(curve); - if ( !bpath ) { - //g_warning("sp_spiral_write(): No path to copy\n"); - return NULL; - } - char *d = sp_svg_write_path ( bpath ); - repr->setAttribute("d", d); - g_free (d); + //Duplicate the path + SPCurve *curve = ((SPShape *) spiral)->curve; + //Nulls might be possible if this called iteratively + if ( !curve ) { + //g_warning("sp_spiral_write(): No path to copy\n"); + return NULL; + } + char *d = sp_svg_write_path ( curve->get_pathvector() ); + repr->setAttribute("d", d); + g_free (d); - if (((SPObjectClass *) (parent_class))->write) - ((SPObjectClass *) (parent_class))->write (object, repr, flags | SP_SHAPE_WRITE_PATH); + if (((SPObjectClass *) (parent_class))->write) + ((SPObjectClass *) (parent_class))->write (object, repr, flags | SP_SHAPE_WRITE_PATH); - return repr; + return repr; } /** @@ -308,14 +303,9 @@ sp_spiral_update_patheffect(SPLPEItem *lpeitem, bool write) if (write) { 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); }