GraphViz Graphics

I am trying to draw a dependency graph between C header files using graphviz.

Basically, what I am doing is registering all the #include that appear and the condition (including the #if condition). If the file contains another, it becomes his father on the chart, and the edge condition is a potential condition.

I get a pretty big schedule. The problem is with red labels that are always horizontal (you cannot change this) and always seem to be left justified (I tried labelloc and labeljust, but nothing changes. What is the correct way to "center" the label of one edge.

To avoid this problem, I tried to display the conditions as nodes. If Ah includes Bh in accordance with the ANSI condition, there is a link from Ah to ANSI and then from ANSI to Bh .. This looks fine, but the problem is that if Ch includes Dh under the same conditions, I would see a link from Ah to ANSI, one from Ch to ANSI; one from ANSI to Bh and one from ANSI to Dh The problem is that I don’t know if it is Ah or Ch, which includes Bh. Is there a way to indicate something like going through nodes (link from Ah to Bh, which goes under ANSI, possibly using transparency.)

+5
source share
2 answers

labelloc labeljust . . , "GC" Graph, Cluster "N" Node, .

, , . " ", ( ), , A.h C.h, B.h. , , , .

!

+4

, , , . , , node = .

- , node, :

digraph joins {

node [shape=box weight=bold fontsize=18 color=black fontcolor=black]
edge [color=black fontcolor=black ]
graph[size="6,4",ratio=fill,center=1]

tblXXMaster[shape=record label="tblXXMaster | <f0>intMasterXXNumber | <f1>boolXXsPrinting"] 
set[shape=plaintext label="sets flag"]
setandclear[shape=plaintext label="sets next value\nand clears flag"]
setandclear->tblXXMaster:f0
setandclear->tblXXMaster:f1

set->tblXXMaster:f1
use[shape=plaintext label="uses current\nnumber"]
tblXXMaster:f0->use
XX[shape=plaintext label="XXs\nflag"]
tblXXMaster:f1->XX

"wndManualReceipt\n.procOne"->setandclear
"wndManualDebit\n.procOne"->setandclear
"wndApproveXXs\n.procOne\n.d005TempSetBitToZero"->setandclear
"wndPrintXXs\n.procZero\n.procOne"->setandclear
"wndUnapproveXXs\n.procZero\n.procOne"->setandclear
"wndWriteXXForMultipleInvoices\n.procOne\n.d005TempSetBitToZero"->setandclear
"wndWriteManualXX\n.procOne\n.procZero"->setandclear

"wndConfirmXXPrint\n.applyLock"->set
"wndConfirmMultiInvoiceXXPrint\n.applyLock"->set

use->"wndConfirmXXPrint\n.nextNumber"
use->"wndConfirmManualXXPrint\n.nextNumber"
use->"wndConfirmMultiInvoiceXXPrint\n.nextNumber"
XX->"wndConfirmManualXXPrint\n.doPrint"
XX->"wndConfirmMultiInvoiceXXPrint\n.doPrint"
}
+2

All Articles