dbirch997 / cantera

Automatically exported from code.google.com/p/cantera
1 stars 0 forks source link

Minor bug in reactionpath.cpp, with arrowwidth > 0 #197

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Create a reaction path diagram
2.  Set arrow width > 0
3.  Export to dot
4.  dot -Tsvg graph.dot -o graph.svg causes error with graphviz 2.34

What is the expected output? What do you see instead?
The problem is that in the else statement of:
if (arrow_width < 0)
...
else
s <<  ", style=\"setlinewidth("
      <<  arrow_width << ")\"";
s << ", arrowsize=" << flxratio + 1;

there is no starting '[' character, instead the edge descriptor starts as a ','

e.g.

s0 -> s17, style="setlinewidth(1)", arrowsize=1.57, color="0.7, 1.07, 0.9"
];

What version of the product are you using? On what operating system?
MSVC 2012 x64, graphviz 2.34, windows 7 x64

Please provide any additional information below.
A simple fix is to change:

s <<  ", style=\"setlinewidth("
      <<  arrow_width << ")\"";

to:
s <<  "[fontname=\""+m_font+"\", style=\"setlinewidth("
      <<  arrow_width << ")\"";

Original issue reported on code.google.com by argh...@gmail.com on 20 Dec 2013 at 4:54

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2640.

Original comment by yarmond on 20 Dec 2013 at 7:21

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2692.

Original comment by yarmond on 23 Jan 2014 at 3:06