summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0177e79)
raw | patch | inline | side by side (parent: 0177e79)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 22 Jun 2008 22:28:03 +0000 (22:28 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 22 Jun 2008 22:28:03 +0000 (22:28 +0000) |
src/sp-offset.cpp | patch | blob | history | |
src/sp-path.cpp | patch | blob | history |
diff --git a/src/sp-offset.cpp b/src/sp-offset.cpp
index d3711a9f6d01e26d60c1d7de3643e3a8a4e9df47..c11324ec5f9c23da60f0d18e3c579512acef9070 100644 (file)
--- a/src/sp-offset.cpp
+++ b/src/sp-offset.cpp
#include "libnr/n-art-bpath.h"
#include <libnr/nr-matrix-fns.h>
+#include <2geom/pathvector.h>
#include "xml/repr.h"
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();
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();
}
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 16c8b85f40801d678d97f96e9cc2c6b7c38e231e..962be5cb50bb91a9d70287ec3545399c926dcf3b 100644 (file)
--- a/src/sp-path.cpp
+++ b/src/sp-path.cpp
#include <libnr/n-art-bpath.h>
#include <libnr/nr-path.h>
#include <libnr/nr-matrix-fns.h>
+#include <2geom/pathvector.h>
#include "svg/svg.h"
#include "xml/repr.h"
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();
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();