summaryrefslogtreecommitdiffstats
path: root/src/gradient-drag.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-08-27 09:04:37 +0000
committerKrzysztof Kosinski <tweenk.pl@gmail.com>2011-08-27 09:04:37 +0000
commit72cc39b9f0b340548f395c7f61ca9662b34aea09 (patch)
tree34a0853cff6c6040bc2a0572dfa365280fce2601 /src/gradient-drag.cpp
parentFix "snap guides" toggle (diff)
downloadinkscape-72cc39b9f0b340548f395c7f61ca9662b34aea09.tar.gz
inkscape-72cc39b9f0b340548f395c7f61ca9662b34aea09.zip
Refactor SPItem bounding box methods: remove NRRect usage and make code
using them more obvious. Fix filter region computation. (bzr r10582.1.1)
Diffstat (limited to 'src/gradient-drag.cpp')
-rw-r--r--src/gradient-drag.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp
index 142ae2a98..1275bf995 100644
--- a/src/gradient-drag.cpp
+++ b/src/gradient-drag.cpp
@@ -1788,15 +1788,15 @@ GrDrag::updateLevels ()
for (GSList const* i = this->selection->itemList(); i != NULL; i = i->next) {
SPItem *item = SP_ITEM(i->data);
- Geom::OptRect rect = item->getBboxDesktop ();
+ Geom::OptRect rect = item->desktopVisualBounds();
if (rect) {
// Remember the edges of the bbox and the center axis
hor_levels.push_back(rect->min()[Geom::Y]);
hor_levels.push_back(rect->max()[Geom::Y]);
- hor_levels.push_back(0.5 * (rect->min()[Geom::Y] + rect->max()[Geom::Y]));
+ hor_levels.push_back(rect->midpoint()[Geom::Y]);
vert_levels.push_back(rect->min()[Geom::X]);
vert_levels.push_back(rect->max()[Geom::X]);
- vert_levels.push_back(0.5 * (rect->min()[Geom::X] + rect->max()[Geom::X]));
+ vert_levels.push_back(rect->midpoint()[Geom::X]);
}
}
}