X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fconn-avoid-ref.cpp;h=43c9c0b66cb652c5fa906f50d7d1f5e1c5ca20b2;hb=43be2ed2178db96177d31205e4b9692535612136;hp=2eb1f441e015978b6f6f4de45c89e80c853a1b92;hpb=8b9a820756fdf348239872236be2257f854e094a;p=inkscape.git diff --git a/src/conn-avoid-ref.cpp b/src/conn-avoid-ref.cpp index 2eb1f441e..43c9c0b66 100644 --- a/src/conn-avoid-ref.cpp +++ b/src/conn-avoid-ref.cpp @@ -15,14 +15,11 @@ #include "sp-item.h" #include "conn-avoid-ref.h" -#include "libnr/nr-rect-ops.h" #include "libavoid/polyutil.h" #include "libavoid/router.h" #include "libavoid/connector.h" -#include "xml/simple-node.h" +#include "xml/node.h" #include "document.h" -#include "prefs-utils.h" - #include "desktop.h" #include "desktop-handles.h" #include "sp-namedview.h" @@ -193,7 +190,7 @@ static Avoid::Polygn avoid_item_poly(SPItem const *item) // by the sp_*_update functions, e.g., text. sp_document_ensure_up_to_date(item->document); - boost::optional rHull = item->getBounds(from_2geom(sp_item_i2doc_affine(item))); + Geom::OptRect rHull = item->getBounds(sp_item_i2doc_affine(item)); if (!rHull) { return Avoid::newPoly(0); } @@ -201,13 +198,14 @@ static Avoid::Polygn avoid_item_poly(SPItem const *item) double spacing = desktop->namedview->connector_spacing; // Add a little buffer around the edge of each object. - NR::Rect rExpandedHull = NR::expand(*rHull, -spacing); + Geom::Rect rExpandedHull = *rHull; + rExpandedHull.expandBy(spacing); poly = Avoid::newPoly(4); for (unsigned n = 0; n < 4; ++n) { - NR::Point hullPoint = rExpandedHull.corner(n); - poly.ps[n].x = hullPoint[NR::X]; - poly.ps[n].y = hullPoint[NR::Y]; + Geom::Point hullPoint = rExpandedHull.corner(n); + poly.ps[n].x = hullPoint[Geom::X]; + poly.ps[n].y = hullPoint[Geom::Y]; } return poly; @@ -238,7 +236,7 @@ GSList *get_avoided_items(GSList *list, SPObject *from, SPDesktop *desktop, } -void avoid_item_move(NR::Matrix const */*mp*/, SPItem *moved_item) +void avoid_item_move(Geom::Matrix const */*mp*/, SPItem *moved_item) { Avoid::ShapeRef *shapeRef = moved_item->avoidRef->shapeRef; g_assert(shapeRef); @@ -255,7 +253,7 @@ void avoid_item_move(NR::Matrix const */*mp*/, SPItem *moved_item) void init_avoided_shape_geometry(SPDesktop *desktop) { // Don't count this as changes to the document, - // it is basically just llate initialisation. + // it is basically just late initialisation. SPDocument *document = sp_desktop_document(desktop); bool saved = sp_document_get_undo_sensitive(document); sp_document_set_undo_sensitive(document, false);