From 72cc39b9f0b340548f395c7f61ca9662b34aea09 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sat, 27 Aug 2011 11:04:37 +0200 Subject: Refactor SPItem bounding box methods: remove NRRect usage and make code using them more obvious. Fix filter region computation. (bzr r10582.1.1) --- src/gradient-drag.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gradient-drag.cpp') 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]); } } } -- cgit v1.2.3