From 2f5eb047d9e05be5e68549ef6b75070d2faa7d2f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Sat, 11 Oct 2008 11:16:23 -0400 Subject: Merging from trunk (bzr r6884) --- src/removeoverlap/removeoverlap.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/removeoverlap') 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 records; std::vector rs; - NR::Point const gap(xGap, yGap); + Geom::Point const gap(xGap, yGap); for (std::list::iterator it(selected.begin()); it != selected.end(); ++it) { - using NR::X; using NR::Y; - boost::optional item_box(sp_item_bbox_desktop(*it)); + using Geom::X; using Geom::Y; + boost::optional 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; -- cgit v1.2.3