graphlayout.cpp revision 0e39cdf0cc3195b77fa0effca0e2b07355fe1c0b
/** \file
* Interface between Inkscape code (SPItem) and graphlayout functions.
*/
/*
* Authors:
* Tim Dwyer <tgdwyer@gmail.com>
*
* Copyright (C) 2005 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#include "graphlayout/graphlayout.h"
#include <iostream>
#include <config.h>
#ifdef HAVE_BOOST_GRAPH_LIB
#include "sp-item.h"
#include "sp-item-transform.h"
#include "sp-conn-end-pair.h"
#include "conn-avoid-ref.h"
#include "libavoid/connector.h"
#include <map>
#include <vector>
#include <algorithm>
#include <float.h>
#include <string.h>
using namespace boost;
// create a typedef for the Graph type
typedef iterator_property_map<PositionVec::iterator, property_map<Graph, vertex_index_t>::type> PositionMap;
#endif // HAVE_BOOST_GRAPH_LIB
/**
* Takes a list of inkscape items, extracts the graph defined by
* connectors between them, and uses graph layout techniques to find
* a nice layout
*/
if(!items) {
return;
}
#ifdef HAVE_BOOST_GRAPH_LIB
//Check 2 or more selected objects
if (n < 2) return;
Graph g;
++it)
{
}
}
int i=0;
++it)
{
++ne) {
weightmap[e]=1.0;
}
if(nlist) {
}
}
i=0;
++it)
{
}
}
#else
std::cout<<"Connector network layout not available! Install boost graph library and recompile to enable."<<std::endl;
#endif // HAVE_BOOST_GRAPH_LIB
}