summaryrefslogtreecommitdiffstats
path: root/src/unclump.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/unclump.cpp')
-rw-r--r--src/unclump.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/unclump.cpp b/src/unclump.cpp
index d027a6986..43bcf5005 100644
--- a/src/unclump.cpp
+++ b/src/unclump.cpp
@@ -1,5 +1,6 @@
-/** @file
- * @brief Unclumping objects
+/**
+ * @file
+ * Unclumping objects.
*/
/* Authors:
* bulia byak
@@ -12,6 +13,7 @@
#include <algorithm>
#include <map>
+#include <2geom/transforms.h>
#include "sp-item.h"
@@ -33,7 +35,7 @@ unclump_center (SPItem *item)
return i->second;
}
- Geom::OptRect r = item->getBounds(item->i2d_affine());
+ Geom::OptRect r = item->desktopVisualBounds();
if (r) {
Geom::Point const c = r->midpoint();
c_cache[item->getId()] = c;
@@ -52,7 +54,7 @@ unclump_wh (SPItem *item)
if ( i != wh_cache.end() ) {
wh = i->second;
} else {
- Geom::OptRect r = item->getBounds(item->i2d_affine());
+ Geom::OptRect r = item->desktopVisualBounds();
if (r) {
wh = r->dimensions();
wh_cache[item->getId()] = wh;
@@ -296,7 +298,7 @@ unclump_push (SPItem *from, SPItem *what, double dist)
//g_print ("push %s at %g,%g from %g,%g by %g,%g, dist %g\n", what->getId(), it[Geom::X],it[Geom::Y], p[Geom::X],p[Geom::Y], by[Geom::X],by[Geom::Y], dist);
- what->set_i2d_affine(what->i2d_affine() * move);
+ what->set_i2d_affine(what->i2dt_affine() * move);
what->doWriteTransform(what->getRepr(), what->transform, NULL);
}
@@ -319,7 +321,7 @@ unclump_pull (SPItem *to, SPItem *what, double dist)
//g_print ("pull %s at %g,%g to %g,%g by %g,%g, dist %g\n", what->getId(), it[Geom::X],it[Geom::Y], p[Geom::X],p[Geom::Y], by[Geom::X],by[Geom::Y], dist);
- what->set_i2d_affine(what->i2d_affine() * move);
+ what->set_i2d_affine(what->i2dt_affine() * move);
what->doWriteTransform(what->getRepr(), what->transform, NULL);
}