summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/draw-anchor.cpp2
-rw-r--r--src/libnr/in-svg-plane.h2
-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
-rw-r--r--src/pen-context.cpp2
-rw-r--r--src/pencil-context.cpp2
9 files changed, 28 insertions, 28 deletions
diff --git a/src/draw-anchor.cpp b/src/draw-anchor.cpp
index f4abd596e..c6590ac44 100644
--- a/src/draw-anchor.cpp
+++ b/src/draw-anchor.cpp
@@ -82,7 +82,7 @@ sp_draw_anchor_test(SPDrawAnchor *anchor, Geom::Point w, gboolean activate)
{
SPDesktop *dt = SP_EVENT_CONTEXT_DESKTOP(anchor->dc);
- if ( activate && ( NR::LInfty( w - dt->d2w(anchor->dp) ) <= A_SNAP ) ) {
+ if ( activate && ( Geom::LInfty( w - dt->d2w(anchor->dp) ) <= A_SNAP ) ) {
if (!anchor->active) {
sp_canvas_item_set((GtkObject *) anchor->ctrl, "filled", TRUE, NULL);
anchor->active = TRUE;
diff --git a/src/libnr/in-svg-plane.h b/src/libnr/in-svg-plane.h
index 901fc748f..d184f45be 100644
--- a/src/libnr/in-svg-plane.h
+++ b/src/libnr/in-svg-plane.h
@@ -15,7 +15,7 @@
inline bool
in_svg_plane(NR::Point const p)
{
- return NR::LInfty(p) < 1e18;
+ return Geom::LInfty(p) < 1e18;
}
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)
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 4f4d287ad..46268954a 100644
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
@@ -602,7 +602,7 @@ pen_handle_motion_notify(SPPenContext *const pc, GdkEventMotion const &mevent)
if (pen_within_tolerance) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gint const tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100);
- if ( NR::LInfty( event_w - pen_drag_origin_w ) < tolerance ) {
+ if ( Geom::LInfty( event_w - pen_drag_origin_w ) < tolerance ) {
return FALSE; // Do not drag if we're within tolerance from origin.
}
}
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index 69d9a5e23..88fa3a2d4 100644
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
@@ -318,7 +318,7 @@ pencil_handle_motion_notify(SPPencilContext *const pc, GdkEventMotion const &mev
if (pencil_within_tolerance) {
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
gint const tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100);
- if ( NR::LInfty( Geom::Point(mevent.x,mevent.y) - pencil_drag_origin_w ) < tolerance ) {
+ if ( Geom::LInfty( Geom::Point(mevent.x,mevent.y) - pencil_drag_origin_w ) < tolerance ) {
return FALSE; // Do not drag if we're within tolerance from origin.
}
}