X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fsp-star.cpp;h=96bc9180a9f9ff197411ee0b3f939470ae48ea97;hb=96c274534e3b260291098b7da1875695fe5b30a7;hp=fbcad697586bb0c78a672271eb82254ce231466e;hpb=b30329614741706c88eb3fb05d771ec09ed927a5;p=inkscape.git diff --git a/src/sp-star.cpp b/src/sp-star.cpp index fbcad6975..96bc9180a 100644 --- a/src/sp-star.cpp +++ b/src/sp-star.cpp @@ -34,7 +34,7 @@ static void sp_star_class_init (SPStarClass *klass); static void sp_star_init (SPStar *star); static void sp_star_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr); -static Inkscape::XML::Node *sp_star_write (SPObject *object, Inkscape::XML::Node *repr, guint flags); +static Inkscape::XML::Node *sp_star_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags); static void sp_star_set (SPObject *object, unsigned int key, const gchar *value); static void sp_star_update (SPObject *object, SPCtx *ctx, guint flags); @@ -129,12 +129,11 @@ sp_star_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * r } static Inkscape::XML::Node * -sp_star_write (SPObject *object, Inkscape::XML::Node *repr, guint flags) +sp_star_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) { SPStar *star = SP_STAR (object); if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) { - Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object)); repr = xml_doc->createElement("svg:path"); } @@ -158,7 +157,7 @@ sp_star_write (SPObject *object, Inkscape::XML::Node *repr, guint flags) g_free (d); if (((SPObjectClass *) (parent_class))->write) - ((SPObjectClass *) (parent_class))->write (object, repr, flags); + ((SPObjectClass *) (parent_class))->write (object, xml_doc, repr, flags); return repr; } @@ -285,14 +284,9 @@ sp_star_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); }