diff options
| author | Alvin Penner <penner@vaxxine.com> | 2013-07-01 21:51:53 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2013-07-01 21:51:53 +0000 |
| commit | ced7761e69301a40944684fd295a04ea9e736c24 (patch) | |
| tree | 29fc25fc5a67870d3bd6d7e44d3467b3538fbf9c | |
| parent | LPE bend path: fix crash on "uskeleton.cuts.back()" because of empty uskeleton. (diff) | |
| download | inkscape-ced7761e69301a40944684fd295a04ea9e736c24.tar.gz inkscape-ced7761e69301a40944684fd295a04ea9e736c24.zip | |
Shape calculations. do not quantize the coordinates. (Bug 168158)
Fixed bugs:
- https://launchpad.net/bugs/168158
(bzr r12399)
| -rw-r--r-- | src/livarot/Shape.cpp | 8 | ||||
| -rw-r--r-- | src/livarot/Shape.h | 8 | ||||
| -rw-r--r-- | src/livarot/ShapeMisc.cpp | 12 | ||||
| -rw-r--r-- | src/livarot/ShapeSweep.cpp | 8 |
4 files changed, 18 insertions, 18 deletions
diff --git a/src/livarot/Shape.cpp b/src/livarot/Shape.cpp index c29444a33..130b1b03a 100644 --- a/src/livarot/Shape.cpp +++ b/src/livarot/Shape.cpp @@ -334,8 +334,8 @@ Shape::AddPoint (const Geom::Point x) pData[n].nextLinkedPoint = -1; pData[n].askForWindingS = NULL; pData[n].askForWindingB = -1; - pData[n].rx[0] = Round(p.x[0]); - pData[n].rx[1] = Round(p.x[1]); + pData[n].rx[0] = /*Round*/ (p.x[0]); + pData[n].rx[1] = /*Round*/ (p.x[1]); } if (_has_voronoi_data) { @@ -2116,8 +2116,8 @@ void Shape::initialisePointData() pData[i].pending = 0; pData[i].edgeOnLeft = -1; pData[i].nextLinkedPoint = -1; - pData[i].rx[0] = Round(getPoint(i).x[0]); - pData[i].rx[1] = Round(getPoint(i).x[1]); + pData[i].rx[0] = /*Round*/ (getPoint(i).x[0]); + pData[i].rx[1] = /*Round*/ (getPoint(i).x[1]); } _point_data_initialised = true; diff --git a/src/livarot/Shape.h b/src/livarot/Shape.h index dcd172da2..b999b9dca 100644 --- a/src/livarot/Shape.h +++ b/src/livarot/Shape.h @@ -266,10 +266,10 @@ public: // be careful when using this function // the coordinate rounding function - inline static double Round(double x) - { - return ldexp(rint(ldexp(x, 5)), -5); - } +// inline static double Round(double x) +// { +// return ldexp(rint(ldexp(x, 5)), -5); +// } // 2 miscannellous variations on it, to scale to and back the rounding grid inline static double HalfRound(double x) diff --git a/src/livarot/ShapeMisc.cpp b/src/livarot/ShapeMisc.cpp index 6fd40790f..5bb8a25ef 100644 --- a/src/livarot/ShapeMisc.cpp +++ b/src/livarot/ShapeMisc.cpp @@ -49,8 +49,8 @@ Shape::ConvertToForme (Path * dest) for (int i = 0; i < numberOfPoints(); i++) { - pData[i].rx[0] = Round (getPoint(i).x[0]); - pData[i].rx[1] = Round (getPoint(i).x[1]); + pData[i].rx[0] = /*Round*/ (getPoint(i).x[0]); + pData[i].rx[1] = /*Round*/ (getPoint(i).x[1]); } for (int i = 0; i < numberOfEdges(); i++) { @@ -199,8 +199,8 @@ Shape::ConvertToForme (Path * dest, int nbP, Path * *orig, bool splitWhenForced) for (int i = 0; i < numberOfPoints(); i++) { - pData[i].rx[0] = Round (getPoint(i).x[0]); - pData[i].rx[1] = Round (getPoint(i).x[1]); + pData[i].rx[0] = /*Round*/ (getPoint(i).x[0]); + pData[i].rx[1] = /*Round*/ (getPoint(i).x[1]); } for (int i = 0; i < numberOfEdges(); i++) { @@ -352,8 +352,8 @@ Shape::ConvertToFormeNested (Path * dest, int nbP, Path * *orig, int wildPath,in for (int i = 0; i < numberOfPoints(); i++) { - pData[i].rx[0] = Round (getPoint(i).x[0]); - pData[i].rx[1] = Round (getPoint(i).x[1]); + pData[i].rx[0] = /*Round*/ (getPoint(i).x[0]); + pData[i].rx[1] = /*Round*/ (getPoint(i).x[1]); } for (int i = 0; i < numberOfEdges(); i++) { diff --git a/src/livarot/ShapeSweep.cpp b/src/livarot/ShapeSweep.cpp index c2fd83e31..ffe5a9d73 100644 --- a/src/livarot/ShapeSweep.cpp +++ b/src/livarot/ShapeSweep.cpp @@ -250,8 +250,8 @@ Shape::ConvertToShape (Shape * a, FillRule directed, bool invert) } Geom::Point rPtX; - rPtX[0]= Round (ptX[0]); - rPtX[1]= Round (ptX[1]); + rPtX[0]= /*Round*/ (ptX[0]); + rPtX[1]= /*Round*/ (ptX[1]); int lastPointNo = -1; lastPointNo = AddPoint (rPtX); pData[lastPointNo].rx = rPtX; @@ -1051,8 +1051,8 @@ Shape::Booleen (Shape * a, Shape * b, BooleanOp mod,int cutPathID) } Geom::Point rPtX; - rPtX[0]= Round (ptX[0]); - rPtX[1]= Round (ptX[1]); + rPtX[0]= /*Round*/ (ptX[0]); + rPtX[1]= /*Round*/ (ptX[1]); int lastPointNo = -1; lastPointNo = AddPoint (rPtX); pData[lastPointNo].rx = rPtX; |
