summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 22300de)
raw | patch | inline | side by side (parent: 22300de)
author | jfbarraud <jfbarraud@users.sourceforge.net> | |
Mon, 15 Sep 2008 22:03:54 +0000 (22:03 +0000) | ||
committer | jfbarraud <jfbarraud@users.sourceforge.net> | |
Mon, 15 Sep 2008 22:03:54 +0000 (22:03 +0000) |
src/2geom/piecewise.h | patch | blob | history |
diff --git a/src/2geom/piecewise.h b/src/2geom/piecewise.h
index 73fc76e2ffcdd72f46a89ebe1592b2d25813cc01..3979643b233216019a53d73827ab84fb303b769b 100644 (file)
--- a/src/2geom/piecewise.h
+++ b/src/2geom/piecewise.h
unsigned i = pw.segN(from);
ret.push_cut(from);
- if(i == pw.size() - 1 || to < pw.cuts[i + 1]) { //to/from inhabit the same segment
+ if(i == pw.size() - 1 || to <= pw.cuts[i + 1]) { //to/from inhabit the same segment
ret.push(elem_portion(pw, i, from, to), to);
return ret;
}
ret.push_seg(portion( pw[i], pw.segT(from, i), 1.0 ));
i++;
unsigned fi = pw.segN(to, i);
+ if (to == pw.cuts[fi]) fi-=1;
ret.segs.insert(ret.segs.end(), pw.segs.begin() + i, pw.segs.begin() + fi); //copy segs
ret.cuts.insert(ret.cuts.end(), pw.cuts.begin() + i, pw.cuts.begin() + fi + 1); //and their cuts