summaryrefslogtreecommitdiffstats
path: root/src/livarot/PathConversion.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2009-01-02 15:16:26 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2009-01-02 15:16:26 +0000
commit04d9e6d167063ebbd820fdfb56c3140e3399d5aa (patch)
treebb00057519a9d051a9305652ed3f3ef7328161d2 /src/livarot/PathConversion.cpp
parentMove filters into their own namespace Inkscape::Filters (from NR::) (diff)
downloadinkscape-04d9e6d167063ebbd820fdfb56c3140e3399d5aa.tar.gz
inkscape-04d9e6d167063ebbd820fdfb56c3140e3399d5aa.zip
fix bug in livarot where open paths are rendered as closed path when start == end point. now svg testsuite paths-data-10-t.svg is rendered correctly
(bzr r7059)
Diffstat (limited to 'src/livarot/PathConversion.cpp')
-rw-r--r--src/livarot/PathConversion.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/livarot/PathConversion.cpp b/src/livarot/PathConversion.cpp
index 6ac6717af..29cacb657 100644
--- a/src/livarot/PathConversion.cpp
+++ b/src/livarot/PathConversion.cpp
@@ -75,7 +75,8 @@ void Path::ConvertWithBackData(double treshhold)
case descr_close: {
nextX = pts[lastMoveTo].p;
- AddPoint(nextX, curP, 1.0, false);
+ int n = AddPoint(nextX, curP, 1.0, false);
+ if (n > 0) pts[n].closed = true;
curP++;
break;
}
@@ -251,6 +252,7 @@ void Path::Convert(double treshhold)
descr_cmd[curP]->associated = descr_cmd[curP - 1]->associated;
}
}
+ pts[descr_cmd[curP]->associated].closed = true;
curP++;
break;
}
@@ -460,6 +462,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;
@@ -477,6 +480,7 @@ void Path::Convert(NRRectL *area, double treshhold)
descr_cmd[curP]->associated = descr_cmd[curP - 1]->associated;
}
}
+ pts[descr_cmd[curP]->associated].closed = true;
last_point_relation = 0;
curP++;
break;
@@ -752,7 +756,7 @@ void Path::ConvertEvenLines(double treshhold)
descr_cmd[curP]->associated = descr_cmd[curP - 1]->associated;
}
}
-
+ pts[descr_cmd[curP]->associated].closed = true;
curP++;
break;
}