diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2012-02-19 19:56:03 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2012-02-19 19:56:03 +0000 |
| commit | 5014662ec90a3ec0eb1c5fc261063415eb3f09e0 (patch) | |
| tree | 237e911051fa8be167957d3bbfaf0a9a70006d8d /src/selection.cpp | |
| parent | bad bug in 2geom (diff) | |
| download | inkscape-5014662ec90a3ec0eb1c5fc261063415eb3f09e0.tar.gz inkscape-5014662ec90a3ec0eb1c5fc261063415eb3f09e0.zip | |
remove superfluous RectHull
(bzr r11001)
Diffstat (limited to 'src/selection.cpp')
| -rw-r--r-- | src/selection.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/selection.cpp b/src/selection.cpp index 068c1c00e..d769b402c 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -25,7 +25,7 @@ #include "desktop-handles.h" #include "document.h" #include "selection.h" -#include <2geom/rect-hull.h> +#include <2geom/rect.h> #include "xml/repr.h" #include "preferences.h" @@ -476,18 +476,14 @@ std::vector<Inkscape::SnapCandidatePoint> Selection::getSnapPointsConvexHull(Sna std::vector<Inkscape::SnapCandidatePoint> pHull; if (!p.empty()) { - std::vector<Inkscape::SnapCandidatePoint>::iterator i; - Geom::RectHull cvh((p.front()).getPoint()); - for (i = p.begin(); i != p.end(); ++i) { + Geom::Rect cvh((p.front()).getPoint(), (p.front()).getPoint()); + for (std::vector<Inkscape::SnapCandidatePoint>::iterator i = p.begin(); i != p.end(); ++i) { // these are the points we get back - cvh.add((*i).getPoint()); + cvh.expandTo((*i).getPoint()); } - Geom::OptRect rHull = cvh.bounds(); - if (rHull) { - for ( unsigned i = 0 ; i < 4 ; ++i ) { - pHull.push_back(Inkscape::SnapCandidatePoint(rHull->corner(i), SNAPSOURCE_CONVEX_HULL_CORNER)); - } + for ( unsigned i = 0 ; i < 4 ; ++i ) { + pHull.push_back(Inkscape::SnapCandidatePoint(cvh.corner(i), SNAPSOURCE_CONVEX_HULL_CORNER)); } } |
