summaryrefslogtreecommitdiffstats
path: root/src/removeoverlap/removeoverlap.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2008-10-11 15:16:23 +0000
committerTed Gould <ted@canonical.com>2008-10-11 15:16:23 +0000
commit2f5eb047d9e05be5e68549ef6b75070d2faa7d2f (patch)
treeca2e94164b6d7aaebfc17196ca46bfc825a7665a /src/removeoverlap/removeoverlap.cpp
parentMerge from trunk. (diff)
downloadinkscape-2f5eb047d9e05be5e68549ef6b75070d2faa7d2f.tar.gz
inkscape-2f5eb047d9e05be5e68549ef6b75070d2faa7d2f.zip
Merging from trunk
(bzr r6884)
Diffstat (limited to '')
-rw-r--r--src/removeoverlap/removeoverlap.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/removeoverlap/removeoverlap.cpp b/src/removeoverlap/removeoverlap.cpp
index c2cd6d213..60bb0e4f9 100644
--- a/src/removeoverlap/removeoverlap.cpp
+++ b/src/removeoverlap/removeoverlap.cpp
@@ -21,11 +21,11 @@ using vpsc::Rectangle;
namespace {
struct Record {
SPItem *item;
- NR::Point midpoint;
+ Geom::Point midpoint;
Rectangle *vspc_rect;
Record() {}
- Record(SPItem *i, NR::Point m, Rectangle *r)
+ Record(SPItem *i, Geom::Point m, Rectangle *r)
: item(i), midpoint(m), vspc_rect(r) {}
};
}
@@ -42,16 +42,16 @@ void removeoverlap(GSList const *const items, double const xGap, double const yG
std::vector<Record> records;
std::vector<Rectangle *> rs;
- NR::Point const gap(xGap, yGap);
+ Geom::Point const gap(xGap, yGap);
for (std::list<SPItem *>::iterator it(selected.begin());
it != selected.end();
++it)
{
- using NR::X; using NR::Y;
- boost::optional<NR::Rect> item_box(sp_item_bbox_desktop(*it));
+ using Geom::X; using Geom::Y;
+ boost::optional<Geom::Rect> item_box(sp_item_bbox_desktop(*it));
if (item_box) {
- NR::Point min(item_box->min() - .5*gap);
- NR::Point max(item_box->max() + .5*gap);
+ Geom::Point min(item_box->min() - .5*gap);
+ Geom::Point max(item_box->max() + .5*gap);
Rectangle *vspc_rect = new Rectangle(min[X], max[X], min[Y], max[Y]);
records.push_back(Record(*it, item_box->midpoint(), vspc_rect));
rs.push_back(vspc_rect);
@@ -64,8 +64,8 @@ void removeoverlap(GSList const *const items, double const xGap, double const yG
it != records.end();
++it )
{
- NR::Point const curr = it->midpoint;
- NR::Point const dest(it->vspc_rect->getCentreX(),
+ Geom::Point const curr = it->midpoint;
+ Geom::Point const dest(it->vspc_rect->getCentreX(),
it->vspc_rect->getCentreY());
sp_item_move_rel(it->item, Geom::Translate(dest - curr));
delete it->vspc_rect;