summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2009-08-26 22:36:23 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2009-08-26 22:36:23 +0000
commitb2767f2f915bdbda8b80e0373a3b6c1d74c0a0fb (patch)
treea6f069dc53d76e5c39dbfea12c896428e9db3f90 /src
parentfix bug #377958: don't write inkscape:path-effect to plain svg (diff)
downloadinkscape-b2767f2f915bdbda8b80e0373a3b6c1d74c0a0fb.tar.gz
inkscape-b2767f2f915bdbda8b80e0373a3b6c1d74c0a0fb.zip
lpe-spiro: fix problem with rounding and very nearly zero closing line segments
(bzr r8541)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-spiro.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/live_effects/lpe-spiro.cpp b/src/live_effects/lpe-spiro.cpp
index 72b77622d..794fd980e 100644
--- a/src/live_effects/lpe-spiro.cpp
+++ b/src/live_effects/lpe-spiro.cpp
@@ -158,7 +158,9 @@ LPESpiro::doEffect(SPCurve * curve)
Geom::Path::const_iterator curve_endit = path_it->end_default(); // this determines when the loop has to stop
if (path_it->closed()) {
// if the path is closed, maybe we have to stop a bit earlier because the closing line segment has zerolength.
- if (path_it->back_closed().isDegenerate()) {
+ const Geom::Curve &closingline = path_it->back_closed(); // the closing line segment is always of type Geom::LineSegment.
+ if (are_near(closingline.initialPoint(), closingline.finalPoint())) {
+ // closingline.isDegenerate() did not work, because it only checks for *exact* zero length, which goes wrong for relative coordinates and rounding errors...
// the closing line segment has zero-length. So stop before that one!
curve_endit = path_it->end_open();
}