X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fgraphlayout%2Fgraphlayout.cpp;h=81ea590598397ba993e4163abb4b6e456dcad680;hb=42b53baed61b6b06f33ecfa440a747382eb350df;hp=d0ba2d20ec781c509ebbc0098655a5f73749e9cf;hpb=90a3966dd44e306d23febc15ebd65cde07d7a4dd;p=inkscape.git diff --git a/src/graphlayout/graphlayout.cpp b/src/graphlayout/graphlayout.cpp index d0ba2d20e..81ea59059 100644 --- a/src/graphlayout/graphlayout.cpp +++ b/src/graphlayout/graphlayout.cpp @@ -1,14 +1,15 @@ -/** \file - * Interface between Inkscape code (SPItem) and graphlayout functions. +/** @file + * @brief Interface between Inkscape code (SPItem) and graphlayout functions. */ /* -* Authors: -* Tim Dwyer -* -* Copyright (C) 2005 Authors -* -* Released under GNU GPL. Read the file 'COPYING' for more information. -*/ + * Authors: + * Tim Dwyer + * + * Copyright (C) 2005 Authors + * + * Released under GNU GPL. Read the file 'COPYING' for more information. + */ + #include #include #include @@ -30,6 +31,7 @@ #include "style.h" #include "conn-avoid-ref.h" #include "libavoid/connector.h" +#include "libavoid/router.h" #include "libavoid/geomtypes.h" #include "libcola/cola.h" #include "libvpsc/generate-constraints.h" @@ -65,9 +67,9 @@ struct CheckProgress : TestConvergence { SPItem *u=*it; if(!isConnector(u)) { Rectangle* r=rs[nodelookup[u->id]]; - NR::Rect const item_box(sp_item_bbox_desktop(u)); - NR::Point const curr(item_box.midpoint()); - NR::Point const dest(r->getCentreX(),r->getCentreY()); + Geom::Rect const item_box(sp_item_bbox_desktop(u)); + Geom::Point const curr(item_box.midpoint()); + Geom::Point const dest(r->getCentreX(),r->getCentreY()); sp_item_move_rel(u, Geom::Translate(dest - curr)); } } @@ -124,7 +126,7 @@ void graphlayout(GSList const *const items) { ++i) { SPItem *u=*i; - boost::optional const item_box(sp_item_bbox_desktop(u)); + Geom::OptRect const item_box(sp_item_bbox_desktop(u)); if(item_box) { Geom::Point ll(item_box->min()); Geom::Point ur(item_box->max()); @@ -142,11 +144,11 @@ void graphlayout(GSList const *const items) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); SimpleConstraints scx,scy; - double ideal_connector_length = prefs->getDouble("tools.connector", "length", 100.0); + double ideal_connector_length = prefs->getDouble("/tools/connector/length", 100.0); double directed_edge_height_modifier = 1.0; - bool directed = prefs->getBool("tools.connector", "directedlayout"); - bool avoid_overlaps = prefs->getBool("tools.connector", "avoidoverlaplayout"); + bool directed = prefs->getBool("/tools/connector/directedlayout"); + bool avoid_overlaps = prefs->getBool("/tools/connector/avoidoverlaplayout"); for (list::iterator i(selected.begin()); i != selected.end(); @@ -226,7 +228,7 @@ void graphlayout(GSList const *const items) { map::iterator i=nodelookup.find(u->id); if(i!=nodelookup.end()) { Rectangle* r=rs[i->second]; - boost::optional item_box(sp_item_bbox_desktop(u)); + Geom::OptRect item_box(sp_item_bbox_desktop(u)); if(item_box) { Geom::Point const curr(item_box->midpoint()); Geom::Point const dest(r->getCentreX(),r->getCentreY());