diff options
Diffstat (limited to 'src/2geom/crossing.cpp')
| -rw-r--r-- | src/2geom/crossing.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/2geom/crossing.cpp b/src/2geom/crossing.cpp index d717a4ed5..91180a939 100644 --- a/src/2geom/crossing.cpp +++ b/src/2geom/crossing.cpp @@ -113,6 +113,18 @@ CrossingGraph create_crossing_graph(std::vector<Path> const &p, Crossings const */ //} +// provide specific method for Paths because paths can be closed or open. Path::size() is named somewhat wrong... +std::vector<Rect> bounds(Path const &a) { + std::vector<Rect> rs; + for (unsigned i = 0; i < a.size_default(); i++) { + OptRect bb = a[i].boundsFast(); + if (bb) { + rs.push_back(*bb); + } + } + return rs; +} + void merge_crossings(Crossings &a, Crossings &b, unsigned i) { Crossings n; sort_crossings(b, i); |
