[Tcl/Tk Utilities] Tcldot produces errrors when re-rendering a graph
Ported Issue from Mantis Original ID: 918 Reported By: Andy Duller
SEVERITY: MAJOR Submitted: 2005-07-04 14:17:23
OS: X86-LINUX-REDHAT ENTERPRISE 3
VERSION: 2.2.1
DESCRIPTION
When using Tcldot. After a graph has been created using tcldot it can be rendered once correctly but if it is then re-rendered if produces an error. (I am assuming that this type of re-rendering is actually allowed, perhaps this assumption is wrong) In real examples this has produced incorrect colours or even segmentation faults. In the provided example it gives the error:
In addition, the following produces a related error:
% set f [open "test.gif" w]
file4
% $instg write $f gif
Warning: gd_set_style: unsupported style box - ignoring
Interestingly, changing the order of the definition of graph g1, i.e. setting the shape first and then the style, does not produce an error.
STEPS TO REPRODUCE
package require Tcldot
proc draw {} {
global instg
global sigg
eval [$instg render .inst.graph]
eval [$sigg render .sig.graph]
}
set instg \
[dotstring "digraph g1 {anode \[style=bold, shape=box, color=yellow\];}"]
set sigg \
[dotstring "digraph g2 {bnode \[shape=box, style=filled, color=red\];}"]
toplevel .inst
canvas .inst.graph
pack .inst.graph
toplevel .sig
canvas .sig.graph
pack .sig.graph
draw
draw