summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-08-03 20:00:39 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-08-03 20:00:39 +0000
commit585048d04cfe3e2dd96d1782426f373490535a4f (patch)
tree4495183f2fd609904de11ac004e811171aef46af /src
parentfix error in appending paths to existing paths. fixes bug #253639 (diff)
downloadinkscape-585048d04cfe3e2dd96d1782426f373490535a4f.tar.gz
inkscape-585048d04cfe3e2dd96d1782426f373490535a4f.zip
update 2geom: fixes long standing bug where closed paths are not converted correctly back from pwd2; causing lpe-bend to fail for example on a simple rectangle.
(bzr r6551)
Diffstat (limited to 'src')
-rw-r--r--src/2geom/sbasis-to-bezier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/2geom/sbasis-to-bezier.cpp b/src/2geom/sbasis-to-bezier.cpp
index a046d7dbe..cbddccda8 100644
--- a/src/2geom/sbasis-to-bezier.cpp
+++ b/src/2geom/sbasis-to-bezier.cpp
@@ -225,12 +225,13 @@ path_from_piecewise(Geom::Piecewise<Geom::D2<Geom::SBasis> > const &B, double to
if(i+1 == B.size() || !are_near(B[i+1].at0(), B[i].at1(), tol)) {
//start of a new path
if(are_near(start, B[i].at1()) && sbasis_size(B[i]) <= 1) {
- //last line seg already there
+ pb.closePath();
+ //last line seg already there (because of .closePath())
goto no_add;
}
build_from_sbasis(pb, B[i], tol, only_cubicbeziers);
if(are_near(start, B[i].at1())) {
- //it's closed
+ //it's closed, the last closing segment was not a straight line so it needed to be added, but still make it closed here with degenerate straight line.
pb.closePath();
}
no_add: