Code

update 2geom
[inkscape.git] / src / 2geom / sweep.h
1 #ifndef __2GEOM_SWEEP_H__
2 #define __2GEOM_SWEEP_H__
4 #include <vector>
5 #include "d2.h"
7 namespace Geom {
9 struct Event {
10     double x;
11     unsigned ix;
12     bool closing;
13     Event(double pos, unsigned i, bool c) : x(pos), ix(i), closing(c) {}
14 // Lexicographic ordering by x then closing
15     bool operator<(Event const &other) const {
16         if(x < other.x) return true;
17         if(x > other.x) return false;
18         return closing < other.closing;
19     }
21 };
22 std::vector<std::vector<unsigned> > sweep_bounds(std::vector<Rect>);
23 std::vector<std::vector<unsigned> > sweep_bounds(std::vector<Rect>, std::vector<Rect>);
25 std::vector<std::vector<unsigned> > fake_cull(unsigned a, unsigned b);
27 }
29 #endif
31 /*
32   Local Variables:
33   mode:c++
34   c-file-style:"stroustrup"
35   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
36   indent-tabs-mode:nil
37   fill-column:99
38   End:
39 */
40 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :