graphlayout.cpp revision d1c7cc7eb10f1bf5756d299e4a1e4f3060bfed8f
/** \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?!?!
//cout << "Edge: (" << u <<","<<v<<")"<<endl;
}
}
}
}
if(nlist) {
}
}
//double width=maxX-minX;
//double height=maxY-minY;
double eweights[E];
++it)
{
if(!isConnector(u)) {
}
}
}
// vim: set cindent
// vim: ts=4 sw=4 et tw=0 wm=0