diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2010-11-25 20:51:17 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2010-11-25 20:51:17 +0000 |
| commit | 0bd9f7e209d522dbcebe0449a91397fdd9e38977 (patch) | |
| tree | 834c7d02456658b57625ab68cc28f7854a5a85dc /src/2geom/crossing.cpp | |
| parent | Fix handling of x and y attributes of patterns (diff) | |
| parent | Fix ruler redraw issue on GTK 2.22 (diff) | |
| download | inkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.tar.gz inkscape-0bd9f7e209d522dbcebe0449a91397fdd9e38977.zip | |
Merge from trunk
(bzr r9508.1.70)
Diffstat (limited to 'src/2geom/crossing.cpp')
| -rw-r--r-- | src/2geom/crossing.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/2geom/crossing.cpp b/src/2geom/crossing.cpp index d717a4ed5..13affa8e9 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); @@ -200,4 +212,4 @@ void clean(Crossings &/*cr_a*/, Crossings &/*cr_b*/) { fill-column:99 End: */ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 : +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : |
