diff options
| author | Alvin Penner <penner@vaxxine.com> | 2013-09-14 19:54:11 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2013-09-14 19:54:11 +0000 |
| commit | 7debcf27e2e4b795a1a8d56155515ddf5fecf33d (patch) | |
| tree | 4d5a2e02c09c31021c1efab508a1900724f262fa /src | |
| parent | fix windows build (diff) | |
| download | inkscape-7debcf27e2e4b795a1a8d56155515ddf5fecf33d.tar.gz inkscape-7debcf27e2e4b795a1a8d56155515ddf5fecf33d.zip | |
Path->Inset. remove redundant node on inner join. (Bug 1218333)
Fixed bugs:
- https://launchpad.net/bugs/1218333
(bzr r12518)
Diffstat (limited to 'src')
| -rw-r--r-- | src/livarot/PathStroke.cpp | 34 | ||||
| -rw-r--r-- | src/livarot/ShapeSweep.cpp | 3 |
2 files changed, 20 insertions, 17 deletions
diff --git a/src/livarot/PathStroke.cpp b/src/livarot/PathStroke.cpp index cdd5cae6d..50c335176 100644 --- a/src/livarot/PathStroke.cpp +++ b/src/livarot/PathStroke.cpp @@ -456,19 +456,20 @@ Path::DoLeftJoin (Shape * dest, double width, JoinType join, Geom::Point pos, } else {*/ leftStNo = dest->AddPoint (pos + width * pnor); leftEnNo = dest->AddPoint (pos + width * nnor); - int midNo = dest->AddPoint (pos); - int nEdge=dest->AddEdge (leftEnNo, midNo); - if ( dest->hasBackData() ) { - dest->ebData[nEdge].pathID=pathID; - dest->ebData[nEdge].pieceID=pieceID; - dest->ebData[nEdge].tSt=dest->ebData[nEdge].tEn=tID; - } - nEdge=dest->AddEdge (midNo, leftStNo); +// int midNo = dest->AddPoint (pos); +// int nEdge=dest->AddEdge (leftEnNo, midNo); + int nEdge=dest->AddEdge (leftEnNo, leftStNo); if ( dest->hasBackData() ) { dest->ebData[nEdge].pathID=pathID; dest->ebData[nEdge].pieceID=pieceID; dest->ebData[nEdge].tSt=dest->ebData[nEdge].tEn=tID; } +// nEdge=dest->AddEdge (midNo, leftStNo); +// if ( dest->hasBackData() ) { +// dest->ebData[nEdge].pathID=pathID; +// dest->ebData[nEdge].pieceID=pieceID; +// dest->ebData[nEdge].tSt=dest->ebData[nEdge].tEn=tID; +// } // } } else @@ -678,19 +679,20 @@ Path::DoRightJoin (Shape * dest, double width, JoinType join, Geom::Point pos, } else {*/ rightStNo = dest->AddPoint (pos - width*pnor); rightEnNo = dest->AddPoint (pos - width*nnor); - int midNo = dest->AddPoint (pos); - int nEdge=dest->AddEdge (rightStNo, midNo); +// int midNo = dest->AddPoint (pos); +// int nEdge=dest->AddEdge (rightStNo, midNo); + int nEdge=dest->AddEdge (rightStNo, rightEnNo); if ( dest->hasBackData() ) { dest->ebData[nEdge].pathID=pathID; dest->ebData[nEdge].pieceID=pieceID; dest->ebData[nEdge].tSt=dest->ebData[nEdge].tEn=tID; } - nEdge=dest->AddEdge (midNo, rightEnNo); - if ( dest->hasBackData() ) { - dest->ebData[nEdge].pathID=pathID; - dest->ebData[nEdge].pieceID=pieceID; - dest->ebData[nEdge].tSt=dest->ebData[nEdge].tEn=tID; - } +// nEdge=dest->AddEdge (midNo, rightEnNo); +// if ( dest->hasBackData() ) { +// dest->ebData[nEdge].pathID=pathID; +// dest->ebData[nEdge].pieceID=pieceID; +// dest->ebData[nEdge].tSt=dest->ebData[nEdge].tEn=tID; +// } // } } } diff --git a/src/livarot/ShapeSweep.cpp b/src/livarot/ShapeSweep.cpp index ff58b4a71..1954139fa 100644 --- a/src/livarot/ShapeSweep.cpp +++ b/src/livarot/ShapeSweep.cpp @@ -2672,7 +2672,8 @@ Shape::TesteAdjacency (Shape * a, int no, const Geom::Point atx, int nPt, double e = IHalfRound ((cross (diff,adir)) * a->eData[no].isqlength); if (-3 < e && e < 3) { - double rad = HalfRound (0.501); // when using single precision, 0.505 is better (0.5 would be the correct value, + double rad = HalfRound (1); +// double rad = HalfRound (0.501); // when using single precision, 0.505 is better (0.5 would be the correct value, // but it produces lots of bugs) diff1[0] = diff[0] - rad; diff1[1] = diff[1] - rad; |
