int main(int argc, char* argv[])
{
std::ifstream is("diagram.gml", std::ifstream::binary);
Graph G;
GraphAttributes GA(G,
GraphAttributes::nodeGraphics |
GraphAttributes::edgeGraphics |
GraphAttributes::nodeLabel |
GraphAttributes::edgeStyle |
GraphAttributes::nodeStyle |
GraphAttributes::nodeTemplate);
//GraphIO::readGML(GA, G, std::cin);
GraphIO::readGML(GA, G, is);
PlanarizationLayout pl;
SubgraphPlanarizer crossMin;
auto* ps = new PlanarSubgraphFast<int>;
ps->runs(100);
VariableEmbeddingInserter *ves = new VariableEmbeddingInserter;
ves->removeReinsert(RemoveReinsertType::All);
crossMin.setSubgraph(ps);
crossMin.setInserter(ves);
EmbedderMinDepthMaxFaceLayers *emb = new EmbedderMinDepthMaxFaceLayers;
pl.setEmbedder(emb);
OrthoLayout *ol = new OrthoLayout;
ol->separation(20.0);
ol->cOverhang(0.4);
pl.setPlanarLayouter(ol);
pl.call(GA);
GraphIO::drawSVG(GA, std::cout);
std::flush(std::cout);
std::ofstream outputFile("output.svg");
GraphIO::drawSVG(GA, outputFile);
return 0;
}