cgraph

Cannot get bounding box of subgraph/cluster, moving from graph to cgraph

Hello, I am trying to convert my code to use cgraph instead of graph. I am trying to get the bounding box of subgraphs, I've trierd: 

GD_width(graph), GD_height(graph) -> both come out to zero.

agget(graph, "bb") -> I get the bb of the main graph, regardless of which sub graph I pass as graph, and I would like to get just the dimensions of the sub-graph.

. agget(graph, "width") -> gives null.

gvFreeLayout leakage

I think gvFreeLayout doesn't delete bb attribute on root graph, or maybe xdot rendering keeps duplicating them.

Dumping xdot _draw_ attribute from root Agraph_t* I get

(first call)

0xdc7200 _draw_ c 7 -#ffffff C 7 -#ffffff P 4 0 0 0 140 142 140 142 0
...

(second call)
0xdc7200 _draw_ c 7 -#ffffff C 7 -#ffffff P 4 0 0 0 140 142 140 142 0 c 7 -#ffffff C 7 -#ffffff P 4 0 0 0 140 142 140 142 0
...

(third call)

html-like label port unrecognized

Hi, I want to connect edges to nodes' port using html-like labels, but I get warnings like below:

Warning: node o, port 0 unrecognized
Warning: node o, port 1 unrecognized
Warning: node o, port 0 unrecognized
Warning: node o, port 1 unrecognized

This is the generated png. I put the equivalent dot description in gvedit, and it works fine. So am i miss something in the c++ code?

The dot:

digraph {

node[shape=none];

Fixed node positions in cgraph

I'm using Graphviz and cgraph to layout some graphs and, for some cases, I already know the positions I want my nodes to be at (as they form a subgraph of a bigger graph).

Using the dot command line tool, you can add the -Knop layout option, but if try gvLayout(context, graph, "nop") in my code, or call gvParseArgs for dot -Knop arguments, the resulting graph has no edge routing, even though I have agset(graph, (char*)"splines", (char*)"true") in my code.

Recent comments

Syndicate content