diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-08-05 00:49:51 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-08-05 00:49:51 +0000 |
| commit | 77dc5f1acd4a6b66b2d6fc5c81f7e5c61ef95785 (patch) | |
| tree | 15c3b32afa8a124f69644c8bd279dd361680974e /src/snapped-curve.cpp | |
| parent | Wholesale cruft removal part 3 (diff) | |
| download | inkscape-77dc5f1acd4a6b66b2d6fc5c81f7e5c61ef95785.tar.gz inkscape-77dc5f1acd4a6b66b2d6fc5c81f7e5c61ef95785.zip | |
Wholesale cruft removal part 4; fix crash when rendering guides
(bzr r9508.1.48)
Diffstat (limited to 'src/snapped-curve.cpp')
| -rw-r--r-- | src/snapped-curve.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/snapped-curve.cpp b/src/snapped-curve.cpp index 77bc8280c..894e49f9a 100644 --- a/src/snapped-curve.cpp +++ b/src/snapped-curve.cpp @@ -20,7 +20,7 @@ Inkscape::SnappedCurve::SnappedCurve(Geom::Point const &snapped_point, int num_p _tolerance = std::max(snapped_tolerance, 1.0); _always_snap = always_snap; _curve = curve; - _second_distance = NR_HUGE; + _second_distance = Geom::infinity(); _second_tolerance = 1; _second_always_snap = false; _point = snapped_point; @@ -36,11 +36,11 @@ Inkscape::SnappedCurve::SnappedCurve() { _num_path = 0; _num_segm = 0; - _distance = NR_HUGE; + _distance = Geom::infinity(); _tolerance = 1; _always_snap = false; _curve = NULL; - _second_distance = NR_HUGE; + _second_distance = Geom::infinity(); _second_tolerance = 1; _second_always_snap = false; _point = Geom::Point(0,0); @@ -67,8 +67,8 @@ Inkscape::SnappedPoint Inkscape::SnappedCurve::intersect(SnappedCurve const &cur if (cs.size() > 0) { // There might be multiple intersections: find the closest - Geom::Coord best_dist = NR_HUGE; - Geom::Point best_p = Geom::Point(NR_HUGE, NR_HUGE); + Geom::Coord best_dist = Geom::infinity(); + Geom::Point best_p = Geom::Point(Geom::infinity(), Geom::infinity()); for (Geom::Crossings::const_iterator i = cs.begin(); i != cs.end(); i++) { Geom::Point p_ix = this->_curve->pointAt((*i).ta); Geom::Coord dist = Geom::distance(p_ix, p); @@ -106,7 +106,7 @@ Inkscape::SnappedPoint Inkscape::SnappedCurve::intersect(SnappedCurve const &cur } // No intersection - return SnappedPoint(Geom::Point(NR_HUGE, NR_HUGE), SNAPSOURCE_UNDEFINED, 0, SNAPTARGET_UNDEFINED, NR_HUGE, 0, false, false, false, false, NR_HUGE, 0, false); + return SnappedPoint(Geom::Point(Geom::infinity(), Geom::infinity()), SNAPSOURCE_UNDEFINED, 0, SNAPTARGET_UNDEFINED, Geom::infinity(), 0, false, false, false, false, Geom::infinity(), 0, false); } // search for the closest snapped line |
