summaryrefslogtreecommitdiffstats
path: root/src/livarot/PathConversion.cpp
diff options
context:
space:
mode:
authorDiederik van Lierop <mail@diedenrezi.nl>2009-04-30 20:08:46 +0000
committerdvlierop2 <dvlierop2@users.sourceforge.net>2009-04-30 20:08:46 +0000
commitc1a8ce30eab2039f4752af87c725ffd24a949c3a (patch)
tree3e06151480b41abd0d94a987f693695bd4756445 /src/livarot/PathConversion.cpp
parentrequestOrphanCollection: do not remove (vacuum) style or script elements (Bug... (diff)
downloadinkscape-c1a8ce30eab2039f4752af87c725ffd24a949c3a.tar.gz
inkscape-c1a8ce30eab2039f4752af87c725ffd24a949c3a.zip
Fix infinite loop as reported in bug #365034
(bzr r7800)
Diffstat (limited to '')
-rw-r--r--src/livarot/PathConversion.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/livarot/PathConversion.cpp b/src/livarot/PathConversion.cpp
index 16717e5bd..bf1e9c5c9 100644
--- a/src/livarot/PathConversion.cpp
+++ b/src/livarot/PathConversion.cpp
@@ -439,7 +439,7 @@ void Path::Convert(NRRectL *area, double treshhold)
curP = 0;
curX[0] = curX[1] = 0;
}
-
+
last_point_relation = POINT_RELATION_TO_AREA(curX, area);
lastMoveTo = AddPoint(curX, true);
}
@@ -464,7 +464,7 @@ void Path::Convert(NRRectL *area, double treshhold)
nextX = nData->p;
lastMoveTo = AddPoint(nextX, true);
descr_cmd[curP]->associated = lastMoveTo;
-
+
last_point_relation = POINT_RELATION_TO_AREA(nextX, area);
start_elimination = false;
@@ -545,7 +545,7 @@ void Path::Convert(NRRectL *area, double treshhold)
} else {
start_elimination = false;
}
-
+
if (!replace) {
RecCubicTo(curX, nData->start, nextX, nData->end, treshhold, 8);
descr_cmd[curP]->associated = AddPoint(nextX,false);
@@ -742,7 +742,7 @@ void Path::ConvertEvenLines(double treshhold)
Geom::Point nexcur;
nexcur = nextX - curX;
const double segL = Geom::L2(nexcur);
- if ( segL > treshhold ) {
+ if ( (segL > treshhold) && (treshhold > 0) ) {
for (double i = treshhold; i < segL; i += treshhold) {
Geom::Point nX;
nX = (segL - i) * curX + i * nextX;
@@ -772,7 +772,7 @@ void Path::ConvertEvenLines(double treshhold)
nextX = nData->p;
Geom::Point nexcur = nextX - curX;
const double segL = L2(nexcur);
- if ( segL > treshhold ) {
+ if ( (segL > treshhold) && (treshhold > 0)) {
for (double i = treshhold; i < segL; i += treshhold) {
Geom::Point nX = ((segL - i) * curX + i * nextX) / segL;
AddPoint(nX);