diff options
| author | Ted Gould <ted@gould.cx> | 2008-11-21 05:24:08 +0000 |
|---|---|---|
| committer | Ted Gould <ted@canonical.com> | 2008-11-21 05:24:08 +0000 |
| commit | 44a3a78fb6a3863c0c7f3c1193837337e68a67e4 (patch) | |
| tree | 1722ee5ec6f88c881cd4124923354b3c1311501b /src/2geom/path-intersection.cpp | |
| parent | Merge from trunk (diff) | |
| download | inkscape-44a3a78fb6a3863c0c7f3c1193837337e68a67e4.tar.gz inkscape-44a3a78fb6a3863c0c7f3c1193837337e68a67e4.zip | |
Merge from fe-moved
(bzr r6891)
Diffstat (limited to 'src/2geom/path-intersection.cpp')
| -rw-r--r-- | src/2geom/path-intersection.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/2geom/path-intersection.cpp b/src/2geom/path-intersection.cpp index 715c67c23..5a4e76020 100644 --- a/src/2geom/path-intersection.cpp +++ b/src/2geom/path-intersection.cpp @@ -23,9 +23,9 @@ int winding(Path const &path, Point p) { Path::const_iterator start; for(Path::const_iterator iter = path.begin(); ; ++iter) { if(iter == path.end_closed()) { return 0; } - if(iter->initialPoint()[Y]!=p[Y]) { start = iter; break; } - if(iter->finalPoint()[Y]!=p[Y]) { start = iter; break; } - if(iter->boundsFast().height()!=0.){ start = iter; break; } + if(iter->initialPoint()[Y]!=p[Y]) { start = iter; break; } + if(iter->finalPoint()[Y]!=p[Y]) { start = iter; break; } + if(iter->boundsFast()->height()!=0.){ start = iter; break; } } int wind = 0; unsigned cnt = 0; @@ -36,7 +36,7 @@ int winding(Path const &path, Point p) { cnt++; if(cnt > path.size()) return wind; //some bug makes this required starting = false; - Rect bounds = iter->boundsFast(); + Rect bounds = *(iter->boundsFast()); Coord x = p[X], y = p[Y]; if(x > bounds.right() || !bounds[Y].contains(y)) continue; //ray doesn't intersect box @@ -70,7 +70,7 @@ int winding(Path const &path, Point p) { next++; for(; ; next++) { if(next == path.end_closed()) next = path.begin(); - Rect bnds = next->boundsFast(); + Rect bnds = *(next->boundsFast()); //TODO: X considerations if(bnds.height() > 0) { //It has diverged @@ -267,13 +267,13 @@ void pair_intersect(Curve const & A, double Al, double Ah, Curve const & B, double Bl, double Bh, Crossings &ret, unsigned depth=0) { // std::cout << depth << "(" << Al << ", " << Ah << ")\n"; - Rect Ar = A.boundsLocal(Interval(Al, Ah)); - if(Ar.isEmpty()) return; + OptRect Ar = A.boundsLocal(Interval(Al, Ah)); + if (!Ar) return; - Rect Br = B.boundsLocal(Interval(Bl, Bh)); - if(Br.isEmpty()) return; + OptRect Br = B.boundsLocal(Interval(Bl, Bh)); + if (!Br) return; - if(!Ar.intersects(Br)) return; + if(! Ar->intersects(*Br)) return; //Checks the general linearity of the function if((depth > 12)) { // || (A.boundsLocal(Interval(Al, Ah), 1).maxExtent() < 0.1 |
