diff --git a/src/sp-star.cpp b/src/sp-star.cpp
index 4c5f9623b0f525e917c33375a0a146c076f30fd6..96bc9180a9f9ff197411ee0b3f939470ae48ea97 100644 (file)
--- a/src/sp-star.cpp
+++ b/src/sp-star.cpp
static void sp_star_init (SPStar *star);
static void sp_star_build (SPObject * object, SPDocument * document, Inkscape::XML::Node * repr);
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);
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 *
}
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) {
{
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");
}
repr = xml_doc->createElement("svg:path");
}
sp_repr_set_svg_double(repr, "inkscape:randomized", star->randomized);
}
sp_repr_set_svg_double(repr, "inkscape:randomized", star->randomized);
}
- sp_star_set_shape ((SPShape *) star);
- char *d = sp_svg_write_path (SP_CURVE_BPATH(((SPShape *) star)->curve));
- repr->setAttribute("d", d);
- g_free (d);
+ sp_star_set_shape ((SPShape *) star);
+ char *d = sp_svg_write_path (((SPShape *) star)->curve->get_pathvector());
+ repr->setAttribute("d", d);
+ g_free (d);
if (((SPObjectClass *) (parent_class))->write)
if (((SPObjectClass *) (parent_class))->write)
- ((SPObjectClass *) (parent_class))->write (object, repr, flags);
+ ((SPObjectClass *) (parent_class))->write (object, xml_doc, repr, flags);
return repr;
}
return repr;
}
if (write) {
Inkscape::XML::Node *repr = SP_OBJECT_REPR(shape);
if ( shape->curve != NULL ) {
if (write) {
Inkscape::XML::Node *repr = SP_OBJECT_REPR(shape);
if ( shape->curve != NULL ) {
- NArtBpath *abp = shape->curve->first_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);
}
} else {
repr->setAttribute("d", NULL);
}