summaryrefslogtreecommitdiffstats
path: root/src/livarot
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-12-05 19:57:37 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-12-05 19:57:37 +0000
commitcd0dcf4bbfce15c27b5bc4db6aadcf0cc633dd78 (patch)
treed62314ee82433918c019fecffc7e4e3bfc7e4777 /src/livarot
parentNR -> 2Geom, more h and cpp files (diff)
downloadinkscape-cd0dcf4bbfce15c27b5bc4db6aadcf0cc633dd78.tar.gz
inkscape-cd0dcf4bbfce15c27b5bc4db6aadcf0cc633dd78.zip
NR::LInfty => Geom::
(bzr r6953)
Diffstat (limited to 'src/livarot')
-rw-r--r--src/livarot/PathConversion.cpp18
-rw-r--r--src/livarot/PathCutting.cpp2
-rw-r--r--src/livarot/PathOutline.cpp24
-rw-r--r--src/livarot/PathSimplify.cpp2
-rw-r--r--src/livarot/PathStroke.cpp2
5 files changed, 24 insertions, 24 deletions
diff --git a/src/livarot/PathConversion.cpp b/src/livarot/PathConversion.cpp
index a7f5a8fd1..4ae4afe86 100644
--- a/src/livarot/PathConversion.cpp
+++ b/src/livarot/PathConversion.cpp
@@ -906,7 +906,7 @@ void Path::ConvertEvenLines(double treshhold)
break;
}
}
- if ( NR::LInfty(curX - nextX) > 0.00001 ) {
+ if ( Geom::LInfty(curX - nextX) > 0.00001 ) {
curX = nextX;
}
}
@@ -1604,7 +1604,7 @@ void Path::Fill(Shape* dest, int pathID, bool justAdd, bool closeIfNeeded, bool
} else {
- if ( NR::LInfty(pts[sbp].p - pts[prp].p) >= 0.00001 ) {
+ if ( Geom::LInfty(pts[sbp].p - pts[prp].p) >= 0.00001 ) {
lEdge = dest->AddEdge(first + curP, first + pathEnd);
if ( lEdge >= 0 ) {
dest->ebData[lEdge].pathID = pathID;
@@ -1618,7 +1618,7 @@ void Path::Fill(Shape* dest, int pathID, bool justAdd, bool closeIfNeeded, bool
}
}
pathEnd = curP;
- if ( NR::LInfty(pts[sbp].p - pts[lm].p) < 0.00001 ) {
+ if ( Geom::LInfty(pts[sbp].p - pts[lm].p) < 0.00001 ) {
closed = true;
} else {
closed = false;
@@ -1676,10 +1676,10 @@ void Path::Fill(Shape* dest, int pathID, bool justAdd, bool closeIfNeeded, bool
closed = false;
lEdge = -1;
} else {
- if ( NR::LInfty(pts[sbp].p - pts[prp].p) >= 0.00001 ) {
+ if ( Geom::LInfty(pts[sbp].p - pts[prp].p) >= 0.00001 ) {
lEdge = dest->AddEdge(first+curP, first+pathEnd);
pathEnd = curP;
- if ( NR::LInfty(pts[sbp].p - pts[lm].p) < 0.00001 ) {
+ if ( Geom::LInfty(pts[sbp].p - pts[lm].p) < 0.00001 ) {
closed = true;
} else {
closed = false;
@@ -1739,7 +1739,7 @@ void Path::Fill(Shape* dest, int pathID, bool justAdd, bool closeIfNeeded, bool
closed = false;
lEdge = -1;
} else {
- if ( NR::LInfty(pts[sbp].p - pts[prp].p) >= 0.00001 ) {
+ if ( Geom::LInfty(pts[sbp].p - pts[prp].p) >= 0.00001 ) {
lEdge = dest->AddEdge(first + pathEnd, first + curP);
dest->ebData[lEdge].pathID = pathID;
dest->ebData[lEdge].pieceID = pts[sbp].piece;
@@ -1751,7 +1751,7 @@ void Path::Fill(Shape* dest, int pathID, bool justAdd, bool closeIfNeeded, bool
dest->ebData[lEdge].tEn = pts[sbp].t;
}
pathEnd = curP;
- if ( NR::LInfty(pts[sbp].p - pts[lm].p) < 0.00001 ) {
+ if ( Geom::LInfty(pts[sbp].p - pts[lm].p) < 0.00001 ) {
closed = true;
} else {
closed = false;
@@ -1808,10 +1808,10 @@ void Path::Fill(Shape* dest, int pathID, bool justAdd, bool closeIfNeeded, bool
closed = false;
lEdge = -1;
} else {
- if ( NR::LInfty(pts[sbp].p - pts[prp].p) >= 0.00001 ) {
+ if ( Geom::LInfty(pts[sbp].p - pts[prp].p) >= 0.00001 ) {
lEdge = dest->AddEdge(first+pathEnd, first+curP);
pathEnd = curP;
- if ( NR::LInfty(pts[sbp].p - pts[lm].p) < 0.00001 ) {
+ if ( Geom::LInfty(pts[sbp].p - pts[lm].p) < 0.00001 ) {
closed = true;
} else {
closed = false;
diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp
index 0a367a1fe..025cf00a7 100644
--- a/src/livarot/PathCutting.cpp
+++ b/src/livarot/PathCutting.cpp
@@ -1413,7 +1413,7 @@ void Path::ConvertPositionsToMoveTo(int nbPos,cut_position* poss)
} else {
}
}
- if ( NR::LInfty(endP-np) < 0.00001 ) {
+ if ( Geom::LInfty(endP-np) < 0.00001 ) {
doesClose=true;
}
if ( ( doesClose || hasClose ) && hasForced >= 0 ) {
diff --git a/src/livarot/PathOutline.cpp b/src/livarot/PathOutline.cpp
index 7ac9a7e7b..67b5370f2 100644
--- a/src/livarot/PathOutline.cpp
+++ b/src/livarot/PathOutline.cpp
@@ -386,7 +386,7 @@ void Path::SubContractOutline(int off, int num_pd,
if (doFirst) {
} else {
if (closeIfNeeded) {
- if ( NR::LInfty (curX- firstP) < 0.0001 ) {
+ if ( Geom::LInfty (curX- firstP) < 0.0001 ) {
OutlineJoin (dest, firstP, curT, firstT, width, join,
miter);
dest->Close ();
@@ -427,7 +427,7 @@ void Path::SubContractOutline(int off, int num_pd,
{
if (doFirst == false)
{
- if (NR::LInfty (curX - firstP) < 0.0001)
+ if (Geom::LInfty (curX - firstP) < 0.0001)
{
OutlineJoin (dest, firstP, curT, firstT, width, join,
miter);
@@ -828,7 +828,7 @@ Path::IsNulCurve (std::vector<PathDescr*> const &cmd, int curD, NR::Point const
case descr_lineto:
{
PathDescrLineTo *nData = dynamic_cast<PathDescrLineTo*>(cmd[curD]);
- if (NR::LInfty(nData->p - curX) < 0.00001) {
+ if (Geom::LInfty(nData->p - curX) < 0.00001) {
return true;
}
return false;
@@ -839,9 +839,9 @@ Path::IsNulCurve (std::vector<PathDescr*> const &cmd, int curD, NR::Point const
NR::Point A = nData->start + nData->end + 2*(curX - nData->p);
NR::Point B = 3*(nData->p - curX) - 2*nData->start - nData->end;
NR::Point C = nData->start;
- if (NR::LInfty(A) < 0.0001
- && NR::LInfty(B) < 0.0001
- && NR::LInfty (C) < 0.0001) {
+ if (Geom::LInfty(A) < 0.0001
+ && Geom::LInfty(B) < 0.0001
+ && Geom::LInfty (C) < 0.0001) {
return true;
}
return false;
@@ -849,7 +849,7 @@ Path::IsNulCurve (std::vector<PathDescr*> const &cmd, int curD, NR::Point const
case descr_arcto:
{
PathDescrArcTo* nData = dynamic_cast<PathDescrArcTo*>(cmd[curD]);
- if ( NR::LInfty(nData->p - curX) < 0.00001) {
+ if ( Geom::LInfty(nData->p - curX) < 0.00001) {
if ((nData->large == false)
|| (fabs (nData->rx) < 0.00001
|| fabs (nData->ry) < 0.00001)) {
@@ -863,26 +863,26 @@ Path::IsNulCurve (std::vector<PathDescr*> const &cmd, int curD, NR::Point const
PathDescrBezierTo* nBData = dynamic_cast<PathDescrBezierTo*>(cmd[curD]);
if (nBData->nb <= 0)
{
- if (NR::LInfty(nBData->p - curX) < 0.00001) {
+ if (Geom::LInfty(nBData->p - curX) < 0.00001) {
return true;
}
return false;
}
else if (nBData->nb == 1)
{
- if (NR::LInfty(nBData->p - curX) < 0.00001) {
+ if (Geom::LInfty(nBData->p - curX) < 0.00001) {
int ip = curD + 1;
PathDescrIntermBezierTo* nData = dynamic_cast<PathDescrIntermBezierTo*>(cmd[ip]);
- if (NR::LInfty(nData->p - curX) < 0.00001) {
+ if (Geom::LInfty(nData->p - curX) < 0.00001) {
return true;
}
}
return false;
- } else if (NR::LInfty(nBData->p - curX) < 0.00001) {
+ } else if (Geom::LInfty(nBData->p - curX) < 0.00001) {
for (int i = 1; i <= nBData->nb; i++) {
int ip = curD + i;
PathDescrIntermBezierTo* nData = dynamic_cast<PathDescrIntermBezierTo*>(cmd[ip]);
- if (NR::LInfty(nData->p - curX) > 0.00001) {
+ if (Geom::LInfty(nData->p - curX) > 0.00001) {
return false;
}
}
diff --git a/src/livarot/PathSimplify.cpp b/src/livarot/PathSimplify.cpp
index f3e544597..5d6d918c7 100644
--- a/src/livarot/PathSimplify.cpp
+++ b/src/livarot/PathSimplify.cpp
@@ -223,7 +223,7 @@ void Path::DoSimplify(int off, int N, double treshhold)
curP = lastP;
}
- if (NR::LInfty(endToPt - moveToPt) < 0.00001) {
+ if (Geom::LInfty(endToPt - moveToPt) < 0.00001) {
Close();
}
diff --git a/src/livarot/PathStroke.cpp b/src/livarot/PathStroke.cpp
index e9f2ae677..cbd7bed5a 100644
--- a/src/livarot/PathStroke.cpp
+++ b/src/livarot/PathStroke.cpp
@@ -65,7 +65,7 @@ void Path::Stroke(Shape *dest, bool doClose, double width, JoinType join,
if ( lastP > lastM+1 ) {
NR::Point sbStart = pts[lastM].p;
NR::Point sbEnd = pts[lastP - 1].p;
- if ( NR::LInfty(sbEnd-sbStart) < 0.00001 ) { // why close lines that shouldn't be closed?
+ if ( Geom::LInfty(sbEnd-sbStart) < 0.00001 ) { // why close lines that shouldn't be closed?
// ah I see, because close is defined here for
// a whole path and should be defined per subpath.
// debut==fin => ferme (on devrait garder un element pour les close(), mais tant pis)