diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-05-22 08:23:27 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-05-22 08:23:27 +0000 |
| commit | 25fa09178b7d0d0befa708e93ea5316ef381caa0 (patch) | |
| tree | 550b4d0d66d0d234b3f49e868cb747987dcc6bf8 /src/2geom/sweep-bounds.cpp | |
| parent | Merge from trunk (diff) | |
| download | inkscape-25fa09178b7d0d0befa708e93ea5316ef381caa0.tar.gz inkscape-25fa09178b7d0d0befa708e93ea5316ef381caa0.zip | |
Update to 2Geom revision 2396
(bzr r14059.2.16)
Diffstat (limited to '')
| -rw-r--r-- | src/2geom/sweep-bounds.cpp (renamed from src/2geom/sweep.cpp) | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/2geom/sweep.cpp b/src/2geom/sweep-bounds.cpp index 6910d5d02..48f168b97 100644 --- a/src/2geom/sweep.cpp +++ b/src/2geom/sweep-bounds.cpp @@ -1,9 +1,27 @@ -#include <2geom/sweep.h> +#include <2geom/sweep-bounds.h> #include <algorithm> namespace Geom { +struct Event { + double x; + unsigned ix; + bool closing; + Event(double pos, unsigned i, bool c) : x(pos), ix(i), closing(c) {} +// Lexicographic ordering by x then closing + bool operator<(Event const &other) const { + if(x < other.x) return true; + if(x > other.x) return false; + return closing < other.closing; + } + bool operator==(Event const &other) const { + return other.x == x && other.ix == ix && other.closing == closing; + } +}; + +std::vector<std::vector<unsigned> > fake_cull(unsigned a, unsigned b); + /** * \brief Make a list of pairs of self intersections in a list of Rects. * |
