summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e5e802c)
raw | patch | inline | side by side (parent: e5e802c)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 3 Aug 2008 20:00:39 +0000 (20:00 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sun, 3 Aug 2008 20:00:39 +0000 (20:00 +0000) |
src/2geom/sbasis-to-bezier.cpp | patch | blob | history |
index a046d7dbe04e98577e6b9819a9c6663937933ff9..cbddccda86cabbd8771797aa1fa282d12cf24afa 100644 (file)
@@ -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: