From: johanengelen Date: Sun, 22 Jun 2008 22:28:03 +0000 (+0000) Subject: read PathVector instead of NArtBpath X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a4ba6cf08033d624f247cc38c2b8b75f01ba0531;p=inkscape.git read PathVector instead of NArtBpath --- diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp index d3711a9f6..c11324ec5 100644 --- a/src/sp-offset.cpp +++ b/src/sp-offset.cpp @@ -39,6 +39,7 @@ #include "libnr/n-art-bpath.h" #include +#include <2geom/pathvector.h> #include "xml/repr.h" @@ -347,13 +348,11 @@ sp_offset_set(SPObject *object, unsigned key, gchar const *value) offset->original = NULL; offset->originalPath = NULL; } - NArtBpath *bpath; - SPCurve *curve; offset->original = strdup (value); - bpath = sp_svg_read_path (offset->original); - curve = SPCurve::new_from_bpath (bpath); // curve se chargera de detruire bpath + Geom::PathVector pv = sp_svg_read_pathv(offset->original); + SPCurve *curve = new SPCurve(pv); // fixme: translate this: curve se chargera de detruire bpath g_assert (curve != NULL); offset->originalPath = bpath_to_liv_path (SP_CURVE_BPATH(curve)); curve->unref(); @@ -531,8 +530,8 @@ sp_offset_set_shape(SPShape *shape) const char *res_d = SP_OBJECT(shape)->repr->attribute("inkscape:original"); if ( res_d ) { - NArtBpath *bpath = sp_svg_read_path (res_d); - SPCurve *c = SPCurve::new_from_bpath (bpath); + Geom::PathVector pv = sp_svg_read_pathv(res_d); + SPCurve *c = new SPCurve(pv); g_assert(c != NULL); sp_shape_set_curve_insync ((SPShape *) offset, c, TRUE); c->unref(); @@ -780,8 +779,8 @@ sp_offset_set_shape(SPShape *shape) } delete orig; - NArtBpath *bpath = sp_svg_read_path (res_d); - SPCurve *c = SPCurve::new_from_bpath (bpath); + Geom::PathVector pv = sp_svg_read_pathv(res_d); + SPCurve *c = new SPCurve(pv); g_assert(c != NULL); sp_shape_set_curve_insync ((SPShape *) offset, c, TRUE); c->unref(); diff --git a/src/sp-path.cpp b/src/sp-path.cpp index 16c8b85f4..962be5cb5 100644 --- a/src/sp-path.cpp +++ b/src/sp-path.cpp @@ -24,6 +24,7 @@ #include #include #include +#include <2geom/pathvector.h> #include "svg/svg.h" #include "xml/repr.h" @@ -247,8 +248,8 @@ sp_path_set(SPObject *object, unsigned int key, gchar const *value) switch (key) { case SP_ATTR_INKSCAPE_ORIGINAL_D: if (value) { - NArtBpath *bpath = sp_svg_read_path(value); - SPCurve *curve = SPCurve::new_from_bpath(bpath); + Geom::PathVector pv = sp_svg_read_pathv(value); + SPCurve *curve = new SPCurve(pv); if (curve) { sp_path_set_original_curve(path, curve, TRUE, true); curve->unref(); @@ -261,8 +262,8 @@ sp_path_set(SPObject *object, unsigned int key, gchar const *value) case SP_ATTR_D: if (!sp_lpe_item_has_path_effect_recursive(SP_LPE_ITEM(path))) { if (value) { - NArtBpath *bpath = sp_svg_read_path(value); - SPCurve *curve = SPCurve::new_from_bpath(bpath); + Geom::PathVector pv = sp_svg_read_pathv(value); + SPCurve *curve = new SPCurve(pv); if (curve) { sp_shape_set_curve((SPShape *) path, curve, TRUE); curve->unref();