summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/livarot/PathConversion.cpp12
-rw-r--r--src/livarot/PathStroke.cpp7
2 files changed, 10 insertions, 9 deletions
diff --git a/src/livarot/PathConversion.cpp b/src/livarot/PathConversion.cpp
index 29cacb657..16717e5bd 100644
--- a/src/livarot/PathConversion.cpp
+++ b/src/livarot/PathConversion.cpp
@@ -252,7 +252,9 @@ void Path::Convert(double treshhold)
descr_cmd[curP]->associated = descr_cmd[curP - 1]->associated;
}
}
- pts[descr_cmd[curP]->associated].closed = true;
+ if ( descr_cmd[curP]->associated > 0 ) {
+ pts[descr_cmd[curP]->associated].closed = true;
+ }
curP++;
break;
}
@@ -480,7 +482,9 @@ void Path::Convert(NRRectL *area, double treshhold)
descr_cmd[curP]->associated = descr_cmd[curP - 1]->associated;
}
}
- pts[descr_cmd[curP]->associated].closed = true;
+ if ( descr_cmd[curP]->associated > 0 ) {
+ pts[descr_cmd[curP]->associated].closed = true;
+ }
last_point_relation = 0;
curP++;
break;
@@ -756,7 +760,9 @@ void Path::ConvertEvenLines(double treshhold)
descr_cmd[curP]->associated = descr_cmd[curP - 1]->associated;
}
}
- pts[descr_cmd[curP]->associated].closed = true;
+ if ( descr_cmd[curP]->associated > 0 ) {
+ pts[descr_cmd[curP]->associated].closed = true;
+ }
curP++;
break;
}
diff --git a/src/livarot/PathStroke.cpp b/src/livarot/PathStroke.cpp
index 18cd05033..465bb205c 100644
--- a/src/livarot/PathStroke.cpp
+++ b/src/livarot/PathStroke.cpp
@@ -63,12 +63,7 @@ void Path::Stroke(Shape *dest, bool doClose, double width, JoinType join,
}
if ( lastP > lastM+1 ) {
- Geom::Point sbStart = pts[lastM].p;
- Geom::Point sbEnd = pts[lastP - 1].p;
- if ( pts[lastP - 1].closed /*Geom::LInfty(sbEnd-sbStart) < 0.00001 */ ) { // why close lines that shouldn't be closed?
- // ah I see, because close is defined here for
- // a whole path and should be defined per subpath.
- // debut==fin => ferme (on devrait garder un element pour les close(), mais tant pis)
+ if ( pts[lastP - 1].closed ) {
DoStroke(lastM, lastP - lastM, dest, true, width, join, butt, miter, true);
} else {
DoStroke(lastM, lastP - lastM, dest, doClose, width, join, butt, miter, true);