summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3c9f2a8)
raw | patch | inline | side by side (parent: 3c9f2a8)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 6 Jun 2008 23:44:01 +0000 (23:44 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 6 Jun 2008 23:44:01 +0000 (23:44 +0000) |
src/sp-spiral.cpp | patch | blob | history |
diff --git a/src/sp-spiral.cpp b/src/sp-spiral.cpp
index 7351ff61fdd71950501e97855fe238a8965d7852..1d4723641f3893f2755b8e028e5707827497bddc 100644 (file)
--- a/src/sp-spiral.cpp
+++ b/src/sp-spiral.cpp
// 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;
}
/**
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);
}