From 04d9e6d167063ebbd820fdfb56c3140e3399d5aa Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 2 Jan 2009 15:16:26 +0000 Subject: 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) --- src/livarot/PathConversion.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/livarot/PathConversion.cpp') 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; } -- cgit v1.2.3