Code

convert item to livarot path using 2geom path
authorjohanengelen <johanengelen@users.sourceforge.net>
Mon, 7 Jul 2008 20:34:51 +0000 (20:34 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Mon, 7 Jul 2008 20:34:51 +0000 (20:34 +0000)
src/splivarot.cpp

index bbcc455407943c72ee10c51a084ef1d2d51ce915..4533ad9c652e7c6a5d026297488f8d23e36814f3 100644 (file)
@@ -1754,15 +1754,14 @@ Path *
 Path_for_item(SPItem *item, bool doTransformation, bool transformFull)
 {
     SPCurve *curve = curve_for_item(item);
-    NArtBpath *bpath = bpath_for_curve(item, curve, doTransformation, transformFull);
-    
-    if (bpath == NULL) {
+    if (curve == NULL) {
         return NULL;
     }
-    
-    Path *dest = bpath_to_Path(bpath);
 
-    g_free(bpath);
+    Geom::PathVector pathv = pathvector_for_curve(item, curve, doTransformation, transformFull);
+
+    Path *dest = new Path;
+    dest->LoadPathVector(pathv);
 
     curve->unref();