diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2010-10-27 23:14:51 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2010-10-27 23:14:51 +0000 |
| commit | 830da71669d34724d710384308ea9e554f9b5e61 (patch) | |
| tree | c1f44f1f0f7cbf87314931006e5acf3d6bef8f40 /src/2geom/crossing.cpp | |
| parent | UI: punctiation and mnemonics in preferences, export and ico preview dialog (diff) | |
| download | inkscape-830da71669d34724d710384308ea9e554f9b5e61.tar.gz inkscape-830da71669d34724d710384308ea9e554f9b5e61.zip | |
provide specific bounds method for Paths because paths can be closed or open. Path::size() is named somewhat wrong... (already committed to 2geom upstream)
Fixed bugs:
- https://launchpad.net/bugs/591586
(bzr r9859)
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); |
