graphlayout.cpp revision 7201e2073c415e91642d7704773ab7e0c24b7654
/** \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 <iostream>
#include <config.h>
#include <map>
#include <vector>
#include <algorithm>
#include <float.h>
#include "util/glib-list-iterators.h"
#include "graphlayout/graphlayout.h"
#include "sp-path.h"
#include "sp-item.h"
#include "sp-item-transform.h"
#include "sp-conn-end-pair.h"
#include "style.h"
#include "conn-avoid-ref.h"
#include "libavoid/connector.h"
#include "libavoid/geomtypes.h"
#include "libvpsc/generate-constraints.h"
#include "prefs-utils.h"
using namespace std;
using namespace cola;
using namespace vpsc;
/**
* Returns true if item is a connector
*/
bool isConnector(SPItem const *const i) {
if(SP_IS_PATH(i)) {
}
}
/**
* Scans the items list and places those items that are
* not connectors in filtered
*/
if(!isConnector(item)) {
}
}
}
/**
* 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;
}
//Check 2 or more selected objects
if (n < 2) return;
++i)
{
SPItem *u=*i;
}
double directed_edge_height_modifier = 1.0;
"directedlayout");
"avoidoverlaplayout");
bool avoid_overlaps = false;
bool directed = false;
directed = true;
}
avoid_overlaps = true;
}
++i)
{
j != connectors.end();
++j) {
} else {
}
// What do we do if iv not in nodelookup?!?!
}
}
}
}
if(nlist) {
}
}
double eweights[E];
printf("Component %d:\n",i);
}
}
++it)
{
if(!isConnector(u)) {
}
}
delete scx[i];
}
delete scy[i];
}
delete rs[i];
}
}
// vim: set cindent
// vim: ts=4 sw=4 et tw=0 wm=0