summaryrefslogtreecommitdiffstats
path: root/src/splivarot.cpp
diff options
context:
space:
mode:
authorJohn Bintz <me@johnbintz.com>2007-02-25 06:03:32 +0000
committerjohncoswell <johncoswell@users.sourceforge.net>2007-02-25 06:03:32 +0000
commit339c16b51f00bb66e1b345b9cc08cc4431d3e755 (patch)
tree7a3a571d99b64528c0fd6780e0c08c81aba32025 /src/splivarot.cpp
parentmove a global to a class property; reduce the use of is_scrolling to prevent ... (diff)
downloadinkscape-339c16b51f00bb66e1b345b9cc08cc4431d3e755.tar.gz
inkscape-339c16b51f00bb66e1b345b9cc08cc4431d3e755.zip
Factor out bpath_to_Path
(bzr r2431)
Diffstat (limited to 'src/splivarot.cpp')
-rw-r--r--src/splivarot.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 58adee3a2..a23d6da02 100644
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
@@ -1723,6 +1723,17 @@ Path_for_item(SPItem *item, bool doTransformation, bool transformFull)
bpath=SP_CURVE_BPATH(curve);
}
+ Path *dest = bpath_to_Path(bpath);
+
+ if ( doTransformation ) {
+ if ( bpath ) g_free(bpath);
+ } else {
+ sp_curve_unref(curve);
+ }
+ return dest;
+}
+
+Path *bpath_to_Path(NArtBpath const *bpath) {
Path *dest = new Path;
dest->SetBackData(false);
{
@@ -1776,12 +1787,6 @@ Path_for_item(SPItem *item, bool doTransformation, bool transformFull)
if (closed)
dest->Close();
}
-
- if ( doTransformation ) {
- if ( bpath ) g_free(bpath);
- } else {
- sp_curve_unref(curve);
- }
return dest;
}