diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2016-10-08 16:05:13 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2016-10-08 16:05:13 +0000 |
| commit | 6092d5422b03608db00f18e6ad8c87465b5dc3e8 (patch) | |
| tree | 2ae791c03acda4ca0bf1cc2fb309a94c39cbd058 /src/livarot | |
| parent | [Bug #770681] KEY MAPPING: Comma and period hijacked by scaling. (diff) | |
| parent | Made the style-utils.h license dual-with-GPLv2+. (diff) | |
| download | inkscape-6092d5422b03608db00f18e6ad8c87465b5dc3e8.tar.gz inkscape-6092d5422b03608db00f18e6ad8c87465b5dc3e8.zip | |
merge trunk-refactoring
(bzr r15156)
Diffstat (limited to 'src/livarot')
| -rw-r--r-- | src/livarot/Path.cpp | 20 | ||||
| -rw-r--r-- | src/livarot/PathOutline.cpp | 10 | ||||
| -rw-r--r-- | src/livarot/Shape.cpp | 4 | ||||
| -rw-r--r-- | src/livarot/float-line.cpp | 6 | ||||
| -rw-r--r-- | src/livarot/int-line.cpp | 2 |
5 files changed, 18 insertions, 24 deletions
diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 68891e4aa..5fa418968 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -380,24 +380,18 @@ void Path::InsertBezierTo(Geom::Point const &iPt, int iNb, int at) /* - * points de la polyligne + * points of the polyline */ void Path::SetBackData (bool nVal) { - if (back == false) { - if (nVal == true && back == false) { + if (! back) { + if (nVal) { back = true; ResetPoints(); - } else if (nVal == false && back == true) { - back = false; - ResetPoints(); } } else { - if (nVal == true && back == false) { - back = true; - ResetPoints(); - } else if (nVal == false && back == true) { + if (! nVal) { back = false; ResetPoints(); } @@ -417,7 +411,7 @@ int Path::AddPoint(Geom::Point const &iPt, bool mvto) return AddPoint (iPt, -1, 0.0, mvto); } - if ( !mvto && pts.empty() == false && pts.back().p == iPt ) { + if ( !mvto && !pts.empty() && pts.back().p == iPt ) { return -1; } @@ -441,11 +435,11 @@ int Path::ReplacePoint(Geom::Point const &iPt) int Path::AddPoint(Geom::Point const &iPt, int ip, double it, bool mvto) { - if (back == false) { + if (! back) { return AddPoint (iPt, mvto); } - if ( !mvto && pts.empty() == false && pts.back().p == iPt ) { + if ( !mvto && !pts.empty() && pts.back().p == iPt ) { return -1; } diff --git a/src/livarot/PathOutline.cpp b/src/livarot/PathOutline.cpp index 0683d8ae8..7043469d2 100644 --- a/src/livarot/PathOutline.cpp +++ b/src/livarot/PathOutline.cpp @@ -424,7 +424,7 @@ void Path::SubContractOutline(int off, int num_pd, } else if (nType == descr_close) { - if (doFirst == false) + if (! doFirst) { if (Geom::LInfty (curX - firstP) < 0.0001) { @@ -810,7 +810,7 @@ void Path::SubContractOutline(int off, int num_pd, } if (closeIfNeeded) { - if (doFirst == false) + if (! doFirst) { } } @@ -853,7 +853,7 @@ Path::IsNulCurve (std::vector<PathDescr*> const &cmd, int curD, Geom::Point cons { PathDescrArcTo* nData = dynamic_cast<PathDescrArcTo*>(cmd[curD]); if ( Geom::LInfty(nData->p - curX) < 0.00001) { - if ((nData->large == false) + if ((! nData->large) || (fabs (nData->rx) < 0.00001 || fabs (nData->ry) < 0.00001)) { return true; @@ -1004,7 +1004,7 @@ void Path::TangentOnArcAt(double at, const Geom::Point &iS, PathDescrArcTo const if (wise) { - if (large == true) + if (large) { drx = -drx; dry = -dry; @@ -1021,7 +1021,7 @@ void Path::TangentOnArcAt(double at, const Geom::Point &iS, PathDescrArcTo const } else { - if (large == false) + if (! large) { drx = -drx; dry = -dry; diff --git a/src/livarot/Shape.cpp b/src/livarot/Shape.cpp index 0bb3390e8..33b383947 100644 --- a/src/livarot/Shape.cpp +++ b/src/livarot/Shape.cpp @@ -1688,8 +1688,8 @@ Shape::CmpToVert (Geom::Point ax, Geom::Point bx,bool as,bool bs) if (si > 0.000001) tstSi = 1; if (si < -0.000001) tstSi = -1; if ( tstSi == 0 ) { - if ( as == true && bs == false ) return -1; - if ( as == false && bs == true ) return 1; + if ( as && !bs ) return -1; + if ( !as && bs ) return 1; } return tstSi; } diff --git a/src/livarot/float-line.cpp b/src/livarot/float-line.cpp index 55fda019a..e5350edc6 100644 --- a/src/livarot/float-line.cpp +++ b/src/livarot/float-line.cpp @@ -499,7 +499,7 @@ void FloatLigne::Flatten() } // then scan all boundaries that start a portion at this position - while ( i >= 0 && i < int(bords.size()) && bords[i].pos == cur && bords[i].start == true ) { + while ( i >= 0 && i < int(bords.size()) && bords[i].pos == cur && bords[i].start ) { rightV += bords[i].val; rightP += bords[i].pente; #ifndef faster_flatten @@ -748,8 +748,8 @@ void FloatLigne::Split(FloatLigne *a, float tresh, FloatLigne *over) /** * Clips the coverage runs to tresh. * - * If addIt == false, it only leaves the parts that are not entirely under - * tresh. If addIt == true, it's the coverage clamped to tresh. + * If addIt is false, it only leaves the parts that are not entirely under + * tresh. If addIt is true, it's the coverage clamped to tresh. */ void FloatLigne::Max(FloatLigne *a, float tresh, bool addIt) { diff --git a/src/livarot/int-line.cpp b/src/livarot/int-line.cpp index d03d62cd7..998f638e7 100644 --- a/src/livarot/int-line.cpp +++ b/src/livarot/int-line.cpp @@ -128,7 +128,7 @@ void IntLigne::Flatten() i++; } midV = RemainingValAt(cur); - while ( i < nbBord && bords[i].pos == cur && bords[i].start == true ) { + while ( i < nbBord && bords[i].pos == cur && bords[i].start ) { rightV += bords[i].val; Enqueue(bords[i].other); i++; |
