Subject: | graphs with arcs, distorted |
Once I added "$mw->update;" (see bug 64089), I could see my graphs,
however, many of the edges were drawn incorrectly. I found this line:
sub _parseEdgePos
{
my ($self, $pos) = @_;
# Note: Arrows can be at the start and end, i.e.
# pos = s,410,104 e,558,59 417,98 ...
# (See example graph 'graphs/directed/ldbxtried.dot')
# hash of start/end coords
# Example: e => [ 12, 3 ], s = [ 1, 3 ]
my %startEnd;
# Process all start/end points (could be none, 1, or 2)
while ( $pos =~ s/^([se])\s*\,\s*(\d+)\s*\,\s*(\d+)\s+// ) { <<== bad
The problem is the x,y coordinates are not always integers. Changing
to:
while ( $pos =~ s/^([se])\s*\,\s*([\d.]+)\s*\,\s*([\d.]+)\s+// ) {
Resolves that problem.
I'm still having other problems (the update issue, createBindings
doesn't seem to work, ...), but this tool seems to valuable to let it
rot like this. Will invest some more time...
Subject: | GraphViz.pm |
Message body is not shown because it is too large.